2023-06-18 15:34:39 +02:00
|
|
|
#!/usr/bin/zsh
|
|
|
|
|
|
|
|
# sync hyperdrive or create a new one
|
|
|
|
# if [ -f './.hyper' ]; then
|
|
|
|
# hyp sync ./ `cat ./.hyper` # -y
|
|
|
|
# else
|
|
|
|
# echo 'Create new hyper-drive?'
|
|
|
|
# hyp sync ./
|
|
|
|
# fi
|
|
|
|
|
|
|
|
# add ssh keys
|
|
|
|
eval `ssh-agent -s`
|
2023-08-06 23:02:26 +02:00
|
|
|
ssh-add ~/.ssh/source-garden
|
2023-06-18 15:34:39 +02:00
|
|
|
|
|
|
|
# create placeholder commit message if none provided
|
|
|
|
COMMIT="$1"
|
|
|
|
[ -z "$COMMIT" ] \
|
|
|
|
&& COMMIT="__ $(date '+%Y%m%d@%H%M%S')"
|
|
|
|
|
|
|
|
git commit -am "$COMMIT"
|
|
|
|
|
|
|
|
# push all branches to every mirror
|
2023-08-06 23:02:26 +02:00
|
|
|
git push --all
|