From ad264851aa27fd82e2ef784af04a1592b0791b65 Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Mon, 28 Oct 2013 14:33:14 +0400 Subject: [PATCH] cosmetic --- update-nutools | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/update-nutools b/update-nutools index 3764bcb..2dfdee4 100755 --- a/update-nutools +++ b/update-nutools @@ -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 ..