david/myzsh
david
/
myzsh
Archived
1
0
Fork 0

pushzshconfig 20.06.2013 15:50

This commit is contained in:
david 2013-06-20 15:50:16 +02:00
parent 27b209cafd
commit 37849ce0ae
2 changed files with 20 additions and 2 deletions

View File

@ -21,6 +21,24 @@ timestamp=$(date +%s)
if [ -r $ZSH/lastrun ];then
lastrun=$(cat $ZSH/lastrun)
if [ $((lastrun+604800)) -le $timestamp ]; then
cd $ZSH; git remote -v | grep -i bitbucket >> /dev/null
if [ $? -eq 0 ]; then
choice=""
echo "myzsh moved to github.com. unfortunately your"
echo "myzsh repository still points to bitbucket.org."
echo -e "do you want to fix this? [y/n] \c"
read choice
if [ $choice = "y" ]; then
cd $ZSH; git remote -v | grep @ >> /dev/null
if [ $? -eq 0 ]; then
cd $ZSH; git remote remove origin
git remote add origin git@github.com:beyondthewall/myzsh.git
else
cd $ZSH; git remote remove origin
git remote add origin git@github.com:beyondthewall/myzsh.git
fi
fi
fi
echo "running update of myzsh now.."
cd $ZSH; git pull origin master; cd -
echo $timestamp > $ZSH/lastrun

View File

@ -54,14 +54,14 @@ rdp()
}
updatezshconfig()
pullmyzsh()
{
cd $ZSH
git pull origin master
cd -
}
pushzshconfig()
pushmyzsh()
{
cd $ZSH