mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-23 03:00:17 -04:00
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:
31
dev/scripts/gitMirror.bsh
Normal file
31
dev/scripts/gitMirror.bsh
Normal 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
|
||||
Reference in New Issue
Block a user