script pour mettre à jour nutools

This commit is contained in:
Jephte CLAIN 2013-10-24 16:03:50 +04:00
parent c81e1b3909
commit d3f237703b
1 changed files with 21 additions and 0 deletions

21
update-nutools Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
TMPSCRIPT=/tmp/update-nutools
REPO=git@vcs.univ.run:modules/nutools.git
NAME=nutools
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