From d45c4129efd24aed8a591cbb73ef0edb36a2f014 Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Wed, 28 May 2014 15:59:38 +0400 Subject: [PATCH] =?UTF-8?q?support=20du=20r=C3=A9pertoire=20ulib=20dans=20?= =?UTF-8?q?lib/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/templates/shell | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/templates/shell b/lib/templates/shell index 2d089c6..30dab61 100755 --- a/lib/templates/shell +++ b/lib/templates/shell @@ -131,7 +131,7 @@ Voulez-vous générer un script avec cette configuration?" X && -d manual fi if [ -z "$type" ]; then - if [ -d "$dir/ulib" ]; then + if [ -d "$dir/ulib" -o -d "$dir/lib/ulib" ]; then enote "Le type de script 'system-or-local' a été sélectionné automatiquement" type=system-or-local elif [ -f /etc/ulibauto ]; then @@ -144,9 +144,17 @@ Voulez-vous générer un script avec cette configuration?" X && fi if [ "$type" == system-or-local ]; then + local ulibdir + if [ -d "$dir/ulib" ]; then + ulibdir=ulib + elif [ -d "$dir/lib/ulib" ]; then + ulibdir=lib/ulib + else + ulibdir=ulib + fi echo >"$file" '#!/bin/bash '"$modeline"' -source "$(dirname "$0")/ulib/auto" || exit 1 +source "$(dirname "$0")/'"$ulibdir"'/auto" || exit 1 #HELP_DESC="$scriptname: " #HELP_ARG_DESC= eval "$(genparse)"