You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
autorestic/install.sh

22 lines
432 B

6 years ago
#!/bin/sh
6 years ago
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
6 years ago
curl -s https://api.github.com/repos/cupcakearmy/autorestic/releases/latest \
| grep "browser_download_url.*_${TYPE}" \
6 years ago
| cut -d : -f 2,3 \
| tr -d \" \
| wget -O ${OUT_FILE} -i -
chmod +x ${OUT_FILE}
autorestic install
autorestic