quoted paths

This commit is contained in:
Mihail Slobodyanuk 2022-12-09 21:27:30 +02:00
parent 0e1fae92cf
commit 0cd4b8a640
2 changed files with 5 additions and 5 deletions

4
build
View file

@ -42,10 +42,10 @@ buildbin() {
local CMD=$(realpath $1) local CMD=$(realpath $1)
echo "Building: $CMD for $GOOS-$GOARCH" echo "Building: $CMD for $GOOS-$GOARCH"
(cd "$TARGET_PATH" && go build $ARGS -ldflags "${LDFLAGS}${LDFLAGS2}" -gcflags "$GCFLAGS" $CMD) (cd "$TARGET_PATH" && go build $ARGS -ldflags "${LDFLAGS}${LDFLAGS2}" -gcflags "$GCFLAGS" "$CMD")
if [ $UPX ]; then if [ $UPX ]; then
upx --brute $CMD upx --brute "$CMD"
fi fi
} }

View file

@ -4,13 +4,13 @@
# mesh and enables it in systemd. You can give it the PKGARCH= argument # mesh and enables it in systemd. You can give it the PKGARCH= argument
# i.e. PKGARCH=i386 sh contrib/deb/generate.sh # i.e. PKGARCH=i386 sh contrib/deb/generate.sh
if [ `pwd` != `git rev-parse --show-toplevel` ] if [ $(pwd) != $(git rev-parse --show-toplevel) ]
then then
echo "You should run this script from the top-level directory of the git repo" echo "You should run this script from the top-level directory of the git repo"
exit 1 exit 1
fi fi
PKGBRANCH=$(basename `git name-rev --name-only HEAD`) PKGBRANCH=$(basename $(git name-rev --name-only HEAD))
PKG=$(sh contrib/semver/name.sh) PKG=$(sh contrib/semver/name.sh)
PKGVERSION=$(sh contrib/semver/version.sh --bare) PKGVERSION=$(sh contrib/semver/version.sh --bare)
PKGARCH=${PKGARCH-amd64} PKGARCH=${PKGARCH-amd64}
@ -113,7 +113,7 @@ EOF
cp mesh /tmp/$PKGNAME/usr/bin/ cp mesh /tmp/$PKGNAME/usr/bin/
cp meshctl /tmp/$PKGNAME/usr/bin/ cp meshctl /tmp/$PKGNAME/usr/bin/
ln -s /usr/bin/meshctl /tmp/$PKGNAME/usr/local/bin/meshctl ln -s /usr/bin/meshctl /tmp/$PKGNAME/usr/local/bin/meshctl
if [ $LOGLEVEL = "DEBUG" ]; then cp contrib/systemd/mesh-debug.service /tmp/$PKGNAME/etc/systemd/system/mesh.service if [ "$LOGLEVEL" = "DEBUG" ]; then cp contrib/systemd/mesh-debug.service /tmp/$PKGNAME/etc/systemd/system/mesh.service
else else
cp contrib/systemd/mesh.service /tmp/$PKGNAME/etc/systemd/system/ cp contrib/systemd/mesh.service /tmp/$PKGNAME/etc/systemd/system/
fi fi