Created
February 28, 2020 22:30
-
-
Save jcrashkit/01efa4df84fa7404b3a8f36ece29a300 to your computer and use it in GitHub Desktop.
Revisions
-
jcrashkit created this gist
Feb 28, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ baseUp() { target=$1 if [ -z "$target" ] then echo -e "\e[31mUndefined\e[0m" fi domain=`echo $target | sed -e 's|^[^/]*//||' -e 's|/.*$||'` targetWs=$WS/targets/$domain if [ -d $WS/targets ] then echo "kk" else echo -e "\e[31mUnfound\e[0m\n\n -cmd: \e[32mmkdir\e[0m $WS/targets" mkdir $WS/targets fi if [ -d $WS/targets/$domain ] then PWD=$WS/targets/$domain echo -e "\e[32mfound\e[0m\n\n -cmd: PWD=$WS/targets/$domain" cd $targetWs else echo -e "\e[31mUnfound\e[0m\n\n -cmd: \e[32mmkdir\e[0m $WS/targets/$domain" mkdir $WS/targets/$domain fi return 0 }