mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2024-12-22 08:16:25 +00:00
install shell script
This commit is contained in:
parent
d59362e82c
commit
24a364ce08
18
install.sh
Normal file → Executable file
18
install.sh
Normal file → Executable file
@ -1,9 +1,21 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
OUT_FILE=/usr/local/bin/autorestic
|
OUT_FILE=/usr/local/bin/autorestic
|
||||||
|
|
||||||
|
if [[ "$OSTYPE" == "linux-gnu" ]]; then
|
||||||
|
TYPE=linux
|
||||||
|
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
TYPE=macos
|
||||||
|
else
|
||||||
|
echo "Unsupported OS"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
curl -s https://api.github.com/repos/cupcakearmy/autorestic/releases/latest \
|
curl -s https://api.github.com/repos/cupcakearmy/autorestic/releases/latest \
|
||||||
| grep "browser_download_url.*-macos" \
|
| grep "browser_download_url.*_${TYPE}" \
|
||||||
| cut -d : -f 2,3 \
|
| cut -d : -f 2,3 \
|
||||||
| tr -d \" \
|
| tr -d \" \
|
||||||
| wget -q -O $OUT_FILE -i -
|
| wget -O ${OUT_FILE} -i -
|
||||||
chmod +x $OUT_FILE
|
chmod +x ${OUT_FILE}
|
||||||
|
|
||||||
|
autorestic
|
Loading…
Reference in New Issue
Block a user