moved some functions to common.sh

chip/stable
Alex Kaplan 7 years ago
parent 7031ce64f2
commit a8eae5e344
  1. 16
      chip-fel-flash.sh
  2. 17
      common.sh

@ -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

@ -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
}
Loading…
Cancel
Save