Commit 6148e54e authored by Christopher Spinrath's avatar Christopher Spinrath

patch_stick.sh: add support for update_stick.sh

Newer versions of the LIP-Image may contain an
update_stick.sh script. Use this script instead of plain
git commands if possible.
parent a188087a
......@@ -4,6 +4,7 @@ set -e
DEVICE=$(blkid -t LABEL=MULTIBOOT -odevice)
MPOINT=/mnt
UPDATE_SCRIPT="./scripts/update_stick.sh"
if [ ! $EUID -eq 0 ]; then
echo "You are not root..."
......@@ -18,8 +19,15 @@ fi
mount "$DEVICE" "$MPOINT"
pushd "$MPOINT" > /dev/null
git checkout master
git pull
if [ -e "$UPDATE_SCRIPT" ]; then
echo "Using $UPDATE_SCRIPT."
bash ./scripts/update_stick.sh
else
echo "No $UPDATE_SCRIPT avaiable."
echo "Falling back to plain git commands."
git checkout master
git pull
fi
popd > /dev/null
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment