22 lines
477 B
Plaintext
22 lines
477 B
Plaintext
|
#!/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
|