tenir comptes des mises à jour de update-nutools

This commit is contained in:
Jephté Clain 2013-10-28 13:02:41 +04:00
parent 5a27222ff6
commit 02fd6fb80e
1 changed files with 13 additions and 9 deletions

View File

@ -9,13 +9,17 @@ if [ $# -ne 1 -o "$1" != --do-update ]; then
/bin/cp "$0" "$TMPSCRIPT"
chmod 755 "$TMPSCRIPT"
exec bash "$TMPSCRIPT" --do-update
else
cd /tmp
rm -rf "$NAME"
git clone "$REPO" || exit 1
cd "$NAME"
bash ./uinst -y || exit 1
cd ..
rm -rf "$NAME"
rm "$0"; exit 0
fi
cd /tmp
rm -rf "$NAME"
git clone "$REPO" || exit 1
cd "$NAME"
if ! diff -q update-nutools "$0"; then
echo "Le fichier update-nutools a été mis à jour. Ce script va être relancé"
exec bash ./update-nutools
fi
bash ./uinst -y || exit 1
cd ..
rm -rf "$NAME"
rm "$0"; exit 0