More fiddling with the SSH keys.

This commit is contained in:
Jorrit Wronski
2014-12-08 10:28:57 +01:00
parent 9e9ddd4a44
commit 2973ef8ff3
2 changed files with 6 additions and 13 deletions

View File

@@ -4,11 +4,9 @@
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"
MIRROR="ssh://git.code.sf.net-jorritw/p/coolprop/git"
#
if [ ! -d $FOLDER ]; then # repo does not exist, clone it
BASEFOLDER=${FOLDER%/*}
@@ -21,11 +19,8 @@ if [ ! -d $FOLDER ]; then # repo does not exist, clone it
#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
git fetch $ORIGIN
git push --force --mirror $MIRROR
popd
exit 0

View File

@@ -46,14 +46,12 @@ else
#
RSYNC_DRY_RUN=
fi
echo "Preparing the ssh key for SourceForge"
eval $(ssh-agent) # Make sure ssh-agent is running
ssh-add "$SFPASS"
#
RSYNC_AUTH="-e \"ssh -i $SFPASS\""
echo "Copying the binaries to SourceForge"
rsync $RSYNC_DRY_RUN -a --no-perms -z --stats "$BINFOLDER/" $SFUSER@frs.sourceforge.net:/home/frs/project/coolprop/CoolProp/$CPVERSION
rsync $RSYNC_AUTH $RSYNC_DRY_RUN -a --no-perms -z --stats "$BINFOLDER/" $SFUSER@frs.sourceforge.net:/home/frs/project/coolprop/CoolProp/$CPVERSION
echo "Publishing the docs on SourceForge"
rsync $RSYNC_DRY_RUN -a --no-perms -z --stats "$DOCFOLDER/" $SFUSER@web.sourceforge.net:/home/project-web/coolprop/htdocs
rsync $RSYNC_AUTH $RSYNC_DRY_RUN -a --no-perms -z --stats "$DOCFOLDER/" $SFUSER@web.sourceforge.net:/home/project-web/coolprop/htdocs
# Change back to where we came from
popd
echo "All done, goodbye."