kolbasa / git-repo-watcher Goto Github PK
View Code? Open in Web Editor NEWA simple bash script to watch a git repository and pull upstream changes if needed.
License: MIT License
A simple bash script to watch a git repository and pull upstream changes if needed.
License: MIT License
I'm seeing errors when the script pulls changes;
./git-repo-watcher: eval: line 92: unexpected EOF while looking for matching `''
./git-repo-watcher: eval: line 93: syntax error: unexpected end of file
Run against these versions of bash;
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17)
Copyright (C) 2007 Free Software Foundation, Inc.
and
GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2016 Free Software Foundation, Inc.
with the second being inside a docker container.
Hey, added some IF statements to add feature if I do "-i 0" it will run just once. Which is great for run it through cron once in a while and not "endlessly".
Would be cool if it had from start, otherwise it's perfect, THANKS
Well I know if I request this, it;s not match with the name of this script ๐
But, please consider to add a function to push to another repo.
The purpose is I wanted to create a backup repo, so everytime there's a change on a repo, after a pull, it will push to another repo.
Thanks.
Edit: Hmm looks like it can be done using hooks ๐ but how to do:
git pull origin master, then:
git push backup master
Fantastic! However, I got errors when pulling changes:
./git-repo-watcher: line 114: ${commit_message@Q}: bad substitution
Version of bash:
GNU bash, version 4.2.46(2)-release (x86_64-koji-linux-gnu) Copyright (C) 2011 Free Software Foundation, Inc.
Solution: Update bash version to at least v4.4 or get rid of the echo line printing the commit message
Keep it up!!!
I can see the directory path is prefixed by "/" by default
If we can get the environment os and prepend if in Linux or Mac would be supported?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.