Last active
March 8, 2019 14:37
-
-
Save chefe/13bc4ceed401bbd0b8f8cd37bf6ab9ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo mount -t davfs https://elearning.hslu.ch/ilias/webdav.php/hslu/ /mnt/ilias |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
function syncI() { | |
syncIliasFolder "$1" "Informatik/Bachelor/2019FS/$2" | |
} | |
function syncTA() { | |
syncIliasFolder "$1" "Technik & Architektur/Bachelor/$2" | |
} | |
function syncIliasFolder() { | |
echo " " | |
echo "===============================================" | |
echo "= Sync $1" | |
echo "===============================================" | |
echo " " | |
rsync -rv "/mnt/ilias/ILIAS/$2/" "$HOME/Sync/$1/" | |
} | |
if [[ $# == 0 ]] || [[ $1 == "AISO" ]]; then | |
syncI "AISO" "INF/I.BA_AISO_MM.F1901" | |
fi | |
if [[ $# == 0 ]] || [[ $1 == "BADA" ]]; then | |
syncI "BADA" "WI/I.BA_BADA.F1901" | |
fi | |
if [[ $# == 0 ]] || [[ $1 == "MOBPRO" ]]; then | |
syncI "MOBPRO" "INF/I.BA_MOBPRO.F1901" | |
fi | |
if [[ $# == 0 ]] || [[ $1 == "SPRG" ]]; then | |
syncI "SPRG" "ICS/I.BA_SPRG_MM.F19" | |
fi | |
if [[ $# == 0 ]] || [[ $1 == "SWAT" ]]; then | |
syncI "SWAT" "INF/I.BA_SWAT_MM.F1901" | |
fi | |
if [[ $# == 0 ]] || [[ $1 == "EBV" ]]; then | |
syncTA "EBV" "Module FS2019 A-M/TA.BA_EBV.F1901" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment