From 3d86a0b6d2031d8a40825872e8c45343c9e503ba Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 14 Feb 2020 07:36:18 +0330 Subject: [PATCH] uninstall script created and check arg function added --- uninstaller.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 uninstaller.sh diff --git a/uninstaller.sh b/uninstaller.sh new file mode 100755 index 0000000..1c65efe --- /dev/null +++ b/uninstaller.sh @@ -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 $# $@