From e47fa53336abee9972e92bcebc2eb7fc53b8d865 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Thu, 5 Oct 2023 13:54:02 +0400 Subject: [PATCH] maj setup pour compat docker --- lib/setup.sh | 11 +++++++++++ lib/uinst/conf | 5 +---- lib/uinst/rootconf | 7 +------ 3 files changed, 13 insertions(+), 10 deletions(-) create mode 100755 lib/setup.sh 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"