Skip to content

Commit 4447dba

Browse files
authored
Merge pull request #7 from virtualzone/fix-musl
Added musl compatibility
2 parents 75258be + 39158f8 commit 4447dba

File tree

4 files changed

+31
-11
lines changed

4 files changed

+31
-11
lines changed

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ macos: macos_amd64 macos_arm64
1515
windows: windows_amd64
1616

1717
linux_amd64:
18-
env GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o build/onedrive-uploader_linux_amd64_${VERSION}
18+
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o build/onedrive-uploader_linux_amd64_${VERSION}
1919

2020
linux_arm64:
21-
env GOOS=linux GOARCH=arm64 go build -ldflags="-w -s" -o build/onedrive-uploader_linux_arm64_${VERSION}
21+
env CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="-w -s" -o build/onedrive-uploader_linux_arm64_${VERSION}
2222

2323
linux_arm:
24-
env GOOS=linux GOARCH=arm go build -ldflags="-w -s" -o build/onedrive-uploader_linux_arm_${VERSION}
24+
env CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -ldflags="-w -s" -o build/onedrive-uploader_linux_arm_${VERSION}
2525

2626
macos_amd64:
27-
env GOOS=darwin GOARCH=amd64 go build -ldflags="-w -s" -o build/onedrive-uploader_macos_amd64_${VERSION}
27+
env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags="-w -s" -o build/onedrive-uploader_macos_amd64_${VERSION}
2828

2929
macos_arm64:
30-
env GOOS=darwin GOARCH=arm64 go build -ldflags="-w -s" -o build/onedrive-uploader_macos_arm64_${VERSION}
30+
env CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags="-w -s" -o build/onedrive-uploader_macos_arm64_${VERSION}
3131

3232
windows_amd64:
33-
env GOOS=windows GOARCH=amd64 go build -ldflags="-w -s" -o build/onedrive-uploader_windows_amd64_${VERSION}
33+
env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-w -s" -o build/onedrive-uploader_windows_amd64_${VERSION}

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.4.2
1+
v0.4.3

get.sh

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
#!/bin/bash
2+
if ! command -v curl &> /dev/null
3+
then
4+
echo "curl is required to install OneDrive Uploader, but could not be found."
5+
exit 1
6+
fi
7+
SUDO=""
8+
if [ "$(id -u)" != "0" ]; then
9+
SUDO="sudo"
10+
if ! command -v $SUDO &> /dev/null
11+
then
12+
SUDO="doas"
13+
fi
14+
if ! command -v $SUDO &> /dev/null
15+
then
16+
echo "Neither sudo nor doas found, try running installer script as root."
17+
exit 1
18+
fi
19+
fi
220
OS=`uname -s | tr '[A-Z]' '[a-z]'`
321
if [[ "$OS" == "darwin" ]]; then
422
OS="macos"
@@ -17,8 +35,10 @@ if [[ $URL == "" ]]; then
1735
echo "Please check for an appropriate binary at: https://github.com/virtualzone/onedrive-uploader"
1836
exit 1
1937
fi
20-
echo "Please specify your sudo password when asked. It's required to write the binary to: /usr/local/bin/"
21-
sudo curl -s -L "${URL}" -o /usr/local/bin/onedrive-uploader && \
22-
sudo chmod +x /usr/local/bin/onedrive-uploader &&
38+
if [ "$(id -u)" != "0" ]; then
39+
echo "Please specify your sudo password when asked. It's required to write the binary to: /usr/local/bin/"
40+
fi
41+
$SUDO curl -s -L "${URL}" -o /usr/local/bin/onedrive-uploader && \
42+
$SUDO chmod +x /usr/local/bin/onedrive-uploader &&
2343
VERSION=`/usr/local/bin/onedrive-uploader version` &&
2444
echo "Successfully installed OneDrive Uploader ${VERSION}."

version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package main
22

3-
var AppVersion = "v0.4.2"
3+
var AppVersion = "v0.4.3"

0 commit comments

Comments
 (0)