uninstall script created and check arg function added

This commit is contained in:
victor 2020-02-14 07:36:18 +03:30
parent d5bbb1bb79
commit 3d86a0b6d2
1 changed files with 18 additions and 0 deletions

18
uninstaller.sh Executable file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
main (){
check_arg $1
echo "shah"
}
error (){
echo -e "\033[1;31merror:\e[0m $@"
exit 1
}
check_arg(){
if [ $1 != 0 ];then
error "please just run script without any argument"
fi
}
main $# $@