samer@0: #!/bin/sh samer@9: # ------------------ CONFIG ---------------- samer@0: samer@9: CLEANUP=no samer@9: INSTALL_SWI=no samer@0: samer@3: function install_swi { samer@9: unpack_into ~/src http://www.swi-prolog.org/download/devel/src/pl-7.1.29.tar.gz samer@9: cd ~/src/pl-7.1.29 samer@3: cp build.templ build samer@3: patch build ~/etc/swipl-build.patch samer@3: ./build samer@3: } samer@3: samer@9: function unpack_into { samer@9: wget_into ~/downloads "$2" samer@9: arname=$(basename "$2") samer@9: cd "$1" samer@9: tar xzf "~/downloads/$arname" samer@9: if [ $CLEANUP == yes ]; then samer@9: rm "~/downloads/$arname" samer@9: fi samer@9: } samer@0: samer@9: function wget_into { samer@9: mkdir -p "$1" samer@9: cd "$1" samer@9: wget "$2" samer@9: } samer@9: samer@9: function get_repo_into { samer@9: dest="$1" samer@9: repo="$3" samer@9: cmd=$2 samer@9: shift 3 samer@9: samer@9: name=$(basename "$repo") samer@9: cd "$dest" samer@9: if [ -d $name ]; then samer@9: echo "$name repository alread present in $dest" samer@9: else samer@9: $cmd clone "$repo" $* samer@9: fi samer@9: } samer@9: samer@9: if [ $INSTALL_SWI == yes ]; then samer@9: install_swi samer@9: fi samer@0: samer@0: # DOWNLOADS FROM REPOs samer@9: get_repo_into ~/src/github git https://samer--/ClioPatria samer@9: get_repo_into ~/src/github git https://github.com/humdrum-tools/humdrum-tools --recursive samer@9: get_repo_into ~/src/hg hg https://code.soundsoftware.ac.uk/hg/dml-cliopatria samer@9: get_repo_into ~/src/hg hg https://code.soundsoftware.ac.uk/hg/ishara samer@9: get_repo_into ~/src/hg hg https://code.soundsoftware.ac.uk/hg/kernscores-utf8 samer@0: samer@3: ln -s ~/src/hg/kernscores-utf8 ~/lib/kern samer@0: samer@9: unpack_into ~/lib https://code.soundsoftware.ac.uk/attachments/download/1281/lib-swipl.tar.gz samer@9: unpack_into ~/var/dml https://code.soundsoftware.ac.uk/attachments/download/1282/var-dml-cpack.tar.gz samer@9: wget_into ~/lib/beets https://code.soundsoftware.ac.uk/attachments/download/1284/music-ro.db samer@9: wget_into ~/lib/mets https://code.soundsoftware.ac.uk/attachments/download/1283/DML_metadata_batch_01.tar.gz samer@3: samer@9: samer@9: