Skip to content
Snippets Groups Projects
Verified Commit 160a740c authored by jonahbeneb02's avatar jonahbeneb02
Browse files

Add script to clone everyones git repository

This is a simplified and generalized version of the script by mielimom02
parent b0d0f11d
No related branches found
No related tags found
No related merge requests found
fugit.sh 0 → 100755
#!/bin/sh
if [ $# -lt 2 ] || ([ ! -f 'grades.csv' ] && [ ! -f 'grades.xls' ]); then
printf "Usage: %s <repository name> <branch>\n" $(basename $0) >&2
printf "Supply a repository name and branch name\n" >&2
printf "Execute within the directory containing 'grades.csv'\n" >&2
exit 1
fi
repo_name="$1"
branch="$2"
for user in *; do
if [ -d "$user" ]; then
cd "$user"
current_dir=$(basename "$PWD")
zedat_username=`echo $current_dir | sed 's/.*(\([a-z0-9]*\))$/\1/'`
if [ ! -d npvp-exercises ]; then
git clone "git@git.imp.fu-berlin.de:$zedat_username/$repo_name"
fi
git -C "$repo_name" checkout "$branch"
cd ..
fi
done
#! /bin/sh
scripts="fixpdf.sh fucopy.sh fufixpdf.sh fuzip.sh fuxournalexport.sh fixtimes.sh fuclean.sh"
scripts="fixpdf.sh fucopy.sh fufixpdf.sh fuzip.sh fuxournalexport.sh fufixtimes.sh fuclean.sh fugit.sh"
destdir="${DESTDIR:=$HOME/.local/bin}"
mkdir -p "$destdir"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment