helm/os/arch/.config/panel/panel_update.sh

22 lines
357 B
Bash
Raw Normal View History

2016-11-02 16:58:47 -07:00
#!/usr/bin/env bash
if [ "$#" -eq 0 ]
then
>&2 echo "Usage: panel_update.sh [LEMON_TO_UPDATE]"
exit 1
fi
CWD=$(cd $(dirname $0) && pwd -P)
LEMON="$CWD/lemons/$1.sh"
if [ ! -f "$LEMON" ]
then
>&2 echo "Couldn't find that lemon ($1)"
exit 2
fi
pkill -f "bash \./$1\.sh"
pushd $CWD/lemons >/dev/null
./$1.sh | ../panel.sh &
popd >/dev/null