Commit 9456b85e authored by Peter Kovary's avatar Peter Kovary
Browse files

Don't use pk3115

Temporarily always update from git
parent 21493c1e
......@@ -90,8 +90,9 @@ while getopts :Ee:hiko:Ss:Tt: opt; do
done
if [ "$onlineExclusions" = true ]
then
# TODO: Investigate if exclusions are still necessary
#exclusions=$(curl http://www.doc.ic.ac.uk/~pk3115/LabStalker/exclude 2>/dev/null)
exclusions=$(cat /homes/pk3115/Public/LabStalker/exclude)
#exclusions=$(cat /homes/pk3115/Public/LabStalker/exclude)
fi
if [[ "tui vm-shell2 vm-shell3 vm-shell4 vm-shell1" =~ $(hostname | cut -d'.' -f1) ]]
......@@ -100,17 +101,21 @@ then
exit 1
fi
if [[ $version < $(cat /homes/pk3115/Public/LabStalker/version) ]]
then
echo "Update available."
read -r -p "Do you want to update? [y/N] " response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]
then
git pull && echo "Updated successfully"
./gethosts -f >/dev/null
exit $?
fi
fi
# TODO: Find out a better way to offer updates
#if [[ $version < $(cat /homes/pk3115/Public/LabStalker/version) ]]
#then
# echo "Update available."
# read -r -p "Do you want to update? [y/N] " response
# if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]
# then
# git pull && echo "Updated successfully"
# ./gethosts -f >/dev/null
# exit $?
# fi
#fi
# Temporary always update... sorry https folks
# You should switch to ssh anyway - check out LabUtils on gitlab
[[ $(git pull -r | grep -v Already) ]] && ./gethosts -f > /dev/null
# Create a temp file for appending records
echo -n > $outputFile
......
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