Detect dist for suiting command params
This commit is contained in:
parent
7aa30c9825
commit
03fa04a277
@ -1,5 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
case $( uname -a | awk '{ print $1 }' ) in
|
||||
Darwin) # although this is deprecated, Mac still use it
|
||||
PERM="+111"
|
||||
;;
|
||||
Linux) ;&
|
||||
CYGWIN~) ;&
|
||||
*)
|
||||
PERM="/111"
|
||||
;;
|
||||
esac
|
||||
|
||||
function __func_head() {
|
||||
echo "Usage:" ${FUNCNAME[1]} $1
|
||||
}
|
||||
@ -14,7 +25,7 @@ SDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/sources
|
||||
|
||||
if [ -d "$SDIR" ]; then
|
||||
echo "Begin source:"
|
||||
for i in $( find $SDIR -maxdepth 1 -type f -perm +111 | sort )
|
||||
for i in $( find $SDIR -maxdepth 1 -type f -perm $PERM | sort )
|
||||
do
|
||||
echo " Source:" $( basename $i )
|
||||
. $i
|
||||
|
Loading…
Reference in New Issue
Block a user