CHIP-tools/common.sh

20 lines
206 B
Bash
Raw Normal View History

2015-09-13 00:08:01 +00:00
#!/bin/bash
2015-09-20 16:42:16 +00:00
TIMEOUT=30
2015-09-17 07:26:38 +00:00
2015-09-13 00:08:01 +00:00
onMac() {
if [ "$(uname)" == "Darwin" ]; then
return 0;
else
return 1;
fi
}
filesize() {
if onMac; then
2015-09-15 02:29:33 +00:00
stat -f "%z" $1
2015-09-13 00:08:01 +00:00
else
2015-09-13 03:15:36 +00:00
stat --printf="%s" $1
2015-09-13 00:08:01 +00:00
fi
}