From 02fd6fb80e5afb38a3ee4b5be38234efd737f96a Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Mon, 28 Oct 2013 13:02:41 +0400 Subject: [PATCH] =?UTF-8?q?tenir=20comptes=20des=20mises=20=C3=A0=20jour?= =?UTF-8?q?=20de=20update-nutools?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- update-nutools | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/update-nutools b/update-nutools index ae14274..3764bcb 100755 --- a/update-nutools +++ b/update-nutools @@ -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 \ No newline at end of file