mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 02:28:05 -07:00
Update v-move-folder-and-make-symlink: debug and additional checking
This commit is contained in:
parent
26cc1d972c
commit
71312f5000
1 changed files with 12 additions and 0 deletions
|
@ -19,6 +19,8 @@ fi
|
|||
FROMFOLDER=$1
|
||||
TOFOLDER=$2
|
||||
|
||||
echo "Executing: v-move-folder-and-make-symlink $1 $2"
|
||||
|
||||
# Includes
|
||||
source $VESTA/func/main.sh
|
||||
|
||||
|
@ -26,6 +28,16 @@ source $VESTA/func/main.sh
|
|||
# Verifications #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
if [ -z "$FROMFOLDER" ]; then
|
||||
echo "First parameter is empty, aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$TOFOLDER" ]; then
|
||||
echo "Second parameter is empty, aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Trimming the ending slash, just in case
|
||||
FROMFOLDER=$(echo "$FROMFOLDER" | sed 's:/*$::')
|
||||
TOFOLDER=$(echo "$TOFOLDER" | sed 's:/*$::')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue