This commit is contained in:
Jephté Clain 2013-10-28 14:33:14 +04:00
parent 02fd6fb80e
commit ad264851aa
1 changed files with 6 additions and 5 deletions

View File

@ -1,12 +1,13 @@
#!/bin/bash
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
TMPSCRIPT=/tmp/update-nutools
SCRIPTNAME=update-nutools
TMPSCRIPT="/tmp/$SCRIPTNAME"
REPO=git@vcs.univ.run:modules/nutools.git
NAME=nutools
if [ $# -ne 1 -o "$1" != --do-update ]; then
/bin/cp "$0" "$TMPSCRIPT"
cp "$0" "$TMPSCRIPT"
chmod 755 "$TMPSCRIPT"
exec bash "$TMPSCRIPT" --do-update
fi
@ -15,9 +16,9 @@ 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
if ! diff -q "$SCRIPTNAME" "$0"; then
echo "NOTE: Le script $SCRIPTNAME a été mis à jour. Il va va être relancé."
exec bash "./$SCRIPTNAME"
fi
bash ./uinst -y || exit 1
cd ..