"pybis/git@sissource.ethz.ch:sispub/openbis.git" did not exist on "965f9dd85466a00b4ccab5d78e57978c6f76326c"
Newer
Older
#!/bin/bash
#
# update_course_repo.sh
# Copyright (C) 2021 Uwe Schmitt <uwe.schmitt@id.ethz.ch>
#
# Distributed under terms of the MIT license.
#
set -e
NOTEBOOKS=??_*.ipynb
NEEDED="images data"
EXTRA="README.md LICENSE intro_presentation environment*.yml custom.html"
NAME=machinelearning-introduction-workshop
REPOURL=https://gitlab.ethz.ch/schmittu/${NAME}
echo
echo This script will upload the following files and folders to ${REPOURL}:
echo
for P in ${NEEDED} ${EXTRA} ${NOTEBOOKS}; do
echo " " ${P}
done
echo
echo you might be prompted to enter your NETHZ account name and password
echo
while true; do
read -p "Do you wish to continue? " yn
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done
FLDR=$(mktemp -d)
git -C ${FLDR} clone ${REPOURL}.git
ROOT=${FLDR}/${NAME}
echo
echo ${ROOT}
echo
test -d ${ROOT}/solutions || mkdir -p ${ROOT}/solutions
cp -R ${NEEDED} ${NOTEBOOKS} ${ROOT}/solutions
cp -R ${NEEDED} ${EXTRA} ${ROOT}
for N in ${NOTEBOOKS}; do
jupyter nbconvert ${N} \
--TagRemovePreprocessor.enabled=True \
--TagRemovePreprocessor.remove_cell_tags=solution \