Update test.sh
This commit is contained in:
23
test.sh
23
test.sh
@@ -18,19 +18,12 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
function myfunc()
|
while getopts 'r' flag; do
|
||||||
{
|
case "${flag}" in
|
||||||
local -n __resultvar="$1" || return 1
|
r) echo "R" ;;
|
||||||
__resultvar[0]="a"
|
a) echo "A" ;;
|
||||||
__resultvar[1]="b"
|
b) echo "B" ;;
|
||||||
echo 'yes';
|
c) echo "C" ;;
|
||||||
if [ -f /etc/debian_version ] ; then
|
esac
|
||||||
__resultvar[2]="c"
|
done
|
||||||
__resultvar[3]="d"
|
|
||||||
__resultvar[4]="e"
|
|
||||||
fi
|
|
||||||
echo "ok"
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ "${(detect_os OS)[1]}" = "debian" ]; then echo 'YES'; fi
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user