osx support for sfx

This commit is contained in:
ed 2020-04-27 00:10:09 +02:00
parent 1c49b71606
commit 00f05941d4
2 changed files with 5 additions and 2 deletions

View file

@ -1,7 +1,7 @@
# coding: utf-8 # coding: utf-8
VERSION = (0, 2, 3) VERSION = (0, 2, 3)
BUILD_DT = (2020, 1, 19) BUILD_DT = (2020, 4, 27)
S_VERSION = ".".join(map(str, VERSION)) S_VERSION = ".".join(map(str, VERSION))
S_BUILD_DT = "{0:04d}-{1:02d}-{2:02d}".format(*BUILD_DT) S_BUILD_DT = "{0:04d}-{1:02d}-{2:02d}".format(*BUILD_DT)

5
scripts/make-unix-sfx.sh Normal file → Executable file
View file

@ -62,6 +62,7 @@ dir="$(
awk '/./ {print; exit}' awk '/./ {print; exit}'
)/pe-copyparty" )/pe-copyparty"
printf '%s\n' "$pybin" | grep -qE ... && [ -e "$pybin" ] && py="$pybin" ||
py="$(command -v python3)" || py="$(command -v python3)" ||
py="$(command -v python)" || py="$(command -v python)" ||
py="$(command -v python2)" || { py="$(command -v python2)" || {
@ -84,7 +85,9 @@ py="$(command -v python2)" || {
now=$(date -u +%s) now=$(date -u +%s)
for d in "$dir".*; do for d in "$dir".*; do
ts=$(stat -c%Y -- "$d") ts=$(stat -c%Y -- "$d" 2>/dev/null) ||
ts=$(stat -f %m%n -- "$d" 2>/dev/null)
[ $((now-ts)) -gt 300 ] && [ $((now-ts)) -gt 300 ] &&
rm -rf "$d" rm -rf "$d"
done done