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

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 ...@@ -4,6 +4,7 @@ set -e
DEVICE=$(blkid -t LABEL=MULTIBOOT -odevice) DEVICE=$(blkid -t LABEL=MULTIBOOT -odevice)
MPOINT=/mnt MPOINT=/mnt
UPDATE_SCRIPT="./scripts/update_stick.sh"
if [ ! $EUID -eq 0 ]; then if [ ! $EUID -eq 0 ]; then
echo "You are not root..." echo "You are not root..."
...@@ -18,8 +19,15 @@ fi ...@@ -18,8 +19,15 @@ fi
mount "$DEVICE" "$MPOINT" mount "$DEVICE" "$MPOINT"
pushd "$MPOINT" > /dev/null pushd "$MPOINT" > /dev/null
git checkout master if [ -e "$UPDATE_SCRIPT" ]; then
git pull 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 popd > /dev/null
......
Supports Markdown
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