Last active
February 3, 2025 19:53
-
-
Save ttscoff/ebd0a8b53534177996085830a9681611 to your computer and use it in GitHub Desktop.
remote git pull script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Remote host is the first argument | |
HOST=$1 | |
# Remote directory is a mirror of the local directory | |
DIR=$(pwd) | |
# SSH to the host and run the pull script | |
ssh $HOST "~/scripts/remotepull.sh '$DIR'" | |
# Sync Build notes not stored in git | |
for file in $(ls build*.md); do | |
scp $file $HOST:$DIR/$(basename $file) | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Simply pull the latest changes on the remote repository | |
# Usage: remotepull.sh <path-to-repo> | |
cd "$1" | |
git pull |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment