Finish SF-file_management, added scripts to mirror the git repository to SourceForge and to control the buildbot master, fixed folder age issues with SourceForge sorting

This commit is contained in:
Jorrit Wronski
2014-12-07 15:15:32 +01:00
parent 82e5aff20c
commit c76f1b9f2e
3 changed files with 100 additions and 11 deletions

31
dev/scripts/gitMirror.bsh Normal file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
#
# Work around for Cron:
USER=coolprop
source /home/$USER/.bash_profile
#
SFPASS="/home/$USER/etc_opt/id_jorritw"
#
FOLDER="/home/$USER/src/CoolProp.git"
ORIGIN="https://github.com/CoolProp/CoolProp.git"
MIRROR="ssh://jorritw@git.code.sf.net/p/coolprop/git"
#
if [ ! -d $FOLDER ]; then # repo does not exist, clone it
BASEFOLDER=${FOLDER%/*}
REPOFOLDER=${FOLDER##*/}
mkdir -p $BASEFOLDER
pushd $BASEFOLDER
git clone --bare $ORIGIN $REPOFOLDER
#pushd $REPOFOLDER
#git remote add sfmirror $MIRROR
#popd
popd
fi
echo "Preparing the ssh key for SourceForge"
eval $(ssh-agent) # Make sure ssh-agent is running
ssh-add "$SFPASS"
pushd $FOLDER
#git push --force --mirror
git push --mirror $MIRROR
popd
exit 0