Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment