aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaZderMind2015-12-15 11:04:34 +0100
committerMaZderMind2015-12-15 11:04:34 +0100
commit232b06799d0768f535c2e29c06e911ec2a3f27a1 (patch)
treebc47a7d471086c1a2996149ac2b1795ce07731fb
parentbe9b88aa2d4cbc272f9262cb20c64ed6144334d6 (diff)
make download.sh work when called from a different location, give progress report
-rwxr-xr-xconfigs/download.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/configs/download.sh b/configs/download.sh
index c2a2b3e..7571e96 100755
--- a/configs/download.sh
+++ b/configs/download.sh
@@ -1,14 +1,19 @@
-#!/bin/sh
+#!/bin/bash
# conferences
-wd=`pwd`
+owd="$(pwd)"
+cd "${0%/*}"
+wd="$(pwd)"
for d in conferences/*; do
if [ -x $d/download.sh ]; then
- cd $d
+ echo "$d"
+ cd "$d"
./download.sh
- cd $wd
+ cd "$wd"
fi
done
+cd "$owd"
# eventkalender upcoming
+echo "eventkalender"
wget -q --no-check-certificate "https://c3voc.de/eventkalender/events.json?filter=upcoming&streaming=yes" -O /tmp/upcoming.json && mv /tmp/upcoming.json upcoming.json