From 075690a67d2bb4f5a86527e5b0ee606b65f5222c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= Date: Tue, 4 Jun 2013 09:48:27 +0000 Subject: [PATCH] Automatically add the missing symlink if we have the required rights --- auto/config | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/auto/config b/auto/config index b81bedd..a660702 100755 --- a/auto/config +++ b/auto/config @@ -41,10 +41,14 @@ eval set -- "$temp" # live-build doesn't work if --parent-debian-distribution is unknown of # debian-cd => we have to put a symlink so that it deals with kali like wheezy -if [ ! -e /usr/share/live/build/data/debian-cd/$dist ]; then - echo "ERROR: Run this first" - echo "ln -sf wheezy /usr/share/live/build/data/debian-cd/$dist" - exit 1 +if [ ! -e /usr/share/live/build/data/debian-cd/kali ]; then + if [ -w /usr/share/live/build/data/debian-cd ]; then + ln -sf wheezy /usr/share/live/build/data/debian-cd/kali + else + echo "ERROR: Run this first:" + echo "ln -sf wheezy /usr/share/live/build/data/debian-cd/kali" + exit 1 + fi fi case "$arch" in