Merge branch 'master' of git.a2s.su:iiiypuk/pmng
This commit is contained in:
commit
7d200ec423
@ -1,2 +1,23 @@
|
|||||||
rm dist/*
|
#!/bin/sh
|
||||||
crystal build ./src/pmng.cr --release --progress -o ./dist/pmng-0.2.5-linux-x86_64
|
|
||||||
|
# Preparing
|
||||||
|
if [ -d "./dist/" ];
|
||||||
|
then
|
||||||
|
rm dist/* 2> /dev/null
|
||||||
|
else
|
||||||
|
mkdir dist/
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Detect Musl C library
|
||||||
|
# thx @Unmanned Player https://stackoverflow.com/a/60471114
|
||||||
|
|
||||||
|
libc=$(ldd /bin/ls | grep 'musl' | head -1 | cut -d ' ' -f1)
|
||||||
|
if [ -z $libc ];
|
||||||
|
then
|
||||||
|
# build libc
|
||||||
|
crystal build ./src/pmng.cr --release --progress -L/usr/lib/ -o ./dist/pmng-0.2.5-linux-x86_64
|
||||||
|
else
|
||||||
|
# Build musl
|
||||||
|
crystal build ./src/pmng.cr --release --progress -o ./dist/pmng-0.2.5-linux-musl-x86_64
|
||||||
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user