dotfiles/bin/ftgfw.sh

23 lines
495 B
Bash
Raw Normal View History

2020-11-21 18:07:26 +00:00
#!/bin/sh
if [ ! -f /tmp/docker.zip ]; then
echo "Please enter nextcloud hostname:"
read -r HOSTNAME
echo "Please enter nextcloud account:"
read -r ACCOUNT
echo "Please enter nextcloud password:"
stty -echo
read -r PASSWORD
stty echo
curl -u "$ACCOUNT:$PASSWORD" -Lo /tmp/docker.zip "https://$HOSTNAME:8443/index.php/apps/files/ajax/download.php?dir=%2F&files=docker"
fi
DEST_DIR=$HOME/Nextcloud
mkdir -p "$DEST_DIR"
7z x -o"$DEST_DIR" /tmp/docker.zip