summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-04-20 23:36:54 +0200
committerJonas Smedegaard <dr@jones.dk>2017-04-20 23:36:54 +0200
commit4b685301a5a7ede1ea0f7813e65a97137279f89b (patch)
tree5f6eda4ef19b98f5cb087517a1d59024d5f3c55c /bin
parentcc52888cd460936fb8d719bb28e4e04e55f41a54 (diff)
Add ftppush script.
Diffstat (limited to 'bin')
-rw-r--r--bin/ftppush.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/bin/ftppush.sh b/bin/ftppush.sh
new file mode 100644
index 0000000..0f609ef
--- /dev/null
+++ b/bin/ftppush.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# Expects a ~/.netrc entry like this:
+# machine byvandring.nu
+# login byvandring.nu
+# password replaceme
+
+set -eu
+
+WPUT="wput --reupload --dont-continue -v"
+
+quiet="-b -o $HOME/wputlog"
+case "$1" in
+ -v)
+ quiet="";;
+esac
+WPUT="$WPUT $quiet"
+
+$WPUT --basename=$HOME/public_websites/bynu.biks.dk/ $HOME/public_websites/bynu.biks.dk/ ftp://byvandring.nu/public_html/ || true
+$WPUT /usr/share/javascript/leaflet/ ftp://byvandring.nu/public_html/ || true