moved some functions to common.sh

This commit is contained in:
Alex Kaplan 2015-09-12 17:08:01 -07:00
parent 7031ce64f2
commit a8eae5e344
2 changed files with 18 additions and 15 deletions

View File

@ -2,21 +2,7 @@
SCRIPTDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
onMac() {
if [ "$(uname)" == "Darwin" ]; then
return 0;
else
return 1;
fi
}
filesize() {
if onMac; then
stat -f%z $0
else
stat --printf="%s" $0
fi
}
source $SCRIPTDIR/common.sh
FEL=fel

17
common.sh Normal file
View File

@ -0,0 +1,17 @@
#!/bin/bash
onMac() {
if [ "$(uname)" == "Darwin" ]; then
return 0;
else
return 1;
fi
}
filesize() {
if onMac; then
stat -f%z $0
else
stat --printf="%s" $0
fi
}