diff --git a/lib/setup.sh b/lib/setup.sh new file mode 100755 index 0000000..1fd8835 --- /dev/null +++ b/lib/setup.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8 +source "$(dirname -- "$0")/../load.sh" || exit 1 + +[ "$(id -u)" -eq 0 ] || die "Ce script doit ĂȘtre lancĂ© avec les droits root" + +cd "$MYDIR/.." +[ -n "$1" ] && dest="$1" || dest="$(pwd)" + +estep "Maj /etc/nucore.sh" +sed "s|@@""dest""@@|$dest|g" load.sh >/etc/nucore.sh diff --git a/lib/uinst/conf b/lib/uinst/conf index 5357b00..6f4d212 100644 --- a/lib/uinst/conf +++ b/lib/uinst/conf @@ -1,9 +1,6 @@ # -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8 source "$@" || exit 1 -source "$ULIBDIR/ulib" || exit 1 -urequire DEFAULTS -cd "$scriptdir/../.." # supprimer les fichiers de VCS -rm -rf .git +rm -rf "$srcdir/.git" diff --git a/lib/uinst/rootconf b/lib/uinst/rootconf index 0375bfc..bdc0ed3 100644 --- a/lib/uinst/rootconf +++ b/lib/uinst/rootconf @@ -1,10 +1,5 @@ # -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8 source "$@" || exit 1 -source "$ULIBDIR/ulib" || exit 1 -urequire DEFAULTS -cd "$scriptdir/../.." -sed "s|@@""dest""@@|$dest|g" load.sh >/etc/nucore.sh - -exit 0 +"$srcdir/lib/setup.sh" "$dest"