Add a script for common functions
This commit is contained in:
parent
bd72e29c05
commit
911d6e2108
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
askContinue () {
|
||||||
|
echo "Are you ready to continue? (yes/no)"
|
||||||
|
read input
|
||||||
|
if [ "$input" != "n" ] && [ "$input" != "no" ]
|
||||||
|
then
|
||||||
|
echo "${1}"
|
||||||
|
else
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
11
draw.sh
11
draw.sh
|
@ -8,16 +8,7 @@
|
||||||
#
|
#
|
||||||
###########################
|
###########################
|
||||||
|
|
||||||
askContinue () {
|
source ./common.sh
|
||||||
echo "Are you ready to continue? (yes/no)"
|
|
||||||
read input
|
|
||||||
if [ "$input" != "n" ] && [ "$input" != "no" ]
|
|
||||||
then
|
|
||||||
echo "${1}"
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ "${1}" == "" ]]; then
|
if [[ "${1}" == "" ]]; then
|
||||||
echo "Please provide a directory as the first argument"
|
echo "Please provide a directory as the first argument"
|
||||||
|
|
Loading…
Reference in New Issue