simplify. Not search for target folder, but ask user to enter target folder

This commit is contained in:
Luk Lu
2023-07-09 14:34:25 +08:00
parent 2eda3bd469
commit 4b808e2bde
10 changed files with 30 additions and 198 deletions

View File

@@ -1,13 +1,10 @@
#!/bin/bash
NIXHOME0=/faronear/sysconfig/nixhome
NIXHOME1=/faronear/npm/sysconfig/nixhome
NIXHOME2=~/faronear/npm/sysconfig/nixhome
NIXHOME3=~/faronear/npm.code/sysconfig/nixhome
NIXHOME4=~/faronear.mycode/npm.code/sysconfig/nixhome
NIXHOME5=`pwd`/nixhome
NIXHOME1=~/sysconfig/nixhome
NIXHOME2=`pwd`/nixhome
if [ "$1" ]
if [ -d "$1" ]
then
NIXHOME=$1
elif [ -d $NIXHOME0 ]
@@ -19,15 +16,6 @@ then
elif [ -d $NIXHOME2 ]
then
NIXHOME=$NIXHOME2
elif [ -d $NIXHOME3 ]
then
NIXHOME=$NIXHOME3
elif [ -d $NIXHOME4 ]
then
NIXHOME=$NIXHOME4
elif [ -d $NIXHOME5 ]
then
NIXHOME=$NIXHOME5
else
echo ××× none of the testing path is valid.
echo "=== Enter [nixhome path] or leave [blank] to exit"