scripts/fahrplan-import.sh: reimplement
This commit is contained in:
parent
d2d031fc40
commit
6527805fb2
|
@ -1,23 +1,19 @@
|
||||||
#!/bin/sh
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# c3d2-web $ ./scripts/fahrplan-import.sh
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
cd ./content/static/datenspuren/2011/ || exit 1
|
CONF=DS2017
|
||||||
|
ROOT=$(dirname $0)/..
|
||||||
|
|
||||||
mkdir .tmp
|
cd $ROOT/content/static/datenspuren/2017
|
||||||
cd .tmp
|
curl -b "_another_frab_session=$FRAB_SESSION" \
|
||||||
curl https://cccv.pentabarf.org/DS2011.tar.gz | tar xz
|
https://frab.cccv.de/en/$CONF/schedule/download_static_export?export_locale=de \
|
||||||
rm DS2011/style.css
|
> $CONF.tar.gz
|
||||||
IFS="
|
tar xzf $CONF.tar.gz
|
||||||
"
|
rm $CONF.tar.gz
|
||||||
for f in $(find . -name \*.html)
|
|
||||||
do
|
|
||||||
sed -e 's/Computersicherheitsworkshop/Computer\­sicher\­heits\­work\­shop/g' \
|
|
||||||
-i "$f"
|
|
||||||
done
|
|
||||||
cp -r DS2011/* ../fahrplan/
|
|
||||||
cd ..
|
|
||||||
rm -r .tmp
|
|
||||||
git add ./fahrplan
|
|
||||||
git commit -m 'fahrplan import [auto]'
|
|
||||||
|
|
||||||
|
[ -d fahrplan/ ] && git rm -r fahrplan/
|
||||||
|
mv $CONF/ fahrplan/
|
||||||
|
git add fahrplan
|
||||||
|
git commit -m "ds17: fahrplan update"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user