From 6745234b9d8c8e950150d37b50512300332c3fff Mon Sep 17 00:00:00 2001 From: Luk Lu Date: Wed, 18 Aug 2021 20:01:55 +0800 Subject: [PATCH] u --- config-home.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/config-home.sh b/config-home.sh index 0772626..1301b99 100755 --- a/config-home.sh +++ b/config-home.sh @@ -7,11 +7,21 @@ if [ $1 ] then SourcePath=$1 else - read -p "Enter config source path (leave blank for /faronear/lib/sysconfig/home) >> " SourcePath + read -p "Enter config source path (leave blank for [Users/luk.lu]/faronear/fon/sysconfig/home) >> " SourcePath if [ ! $SourcePath ] then - echo "Use default source path: /faronear/lib/sysconfig/home" - SourcePath=/faronear/lib/sysconfig/home + echo "Use default source path: [Users/luk.lu]/faronear/fon/sysconfig/home" + if [ -d /faronear/fon/sysconfig/home ] + then + SourcePath=/faronear/fon/sysconfig/home + else + if [ -d /Users/luk.lu/faronear/fon/sysconfig/home ] + then + SourcePath=/Users/luk.lu/faronear/fon/sysconfig/home + else + SourcePath=`pwd`/home + fi + fi fi fi