tools: add a script to pull from upstream repos into the subtrees
parent
5aa47b29cc
commit
46f165b3e3
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
REPO="${1}"
|
||||||
|
REF="${2}"
|
||||||
|
DIR=""
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
printf "usage: $0 <server|webapp> <ref>\n" 1>&2
|
||||||
|
printf "ref: main, tag, branch or commit hash\n" 1>&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$REPO" in
|
||||||
|
server)
|
||||||
|
REPO="https://github.com/etesync/server.git"
|
||||||
|
DIR="server"
|
||||||
|
;;
|
||||||
|
webapp)
|
||||||
|
REPO="https://github.com/etesync/etesync-web.git"
|
||||||
|
DIR="webapp"
|
||||||
|
;;
|
||||||
|
*) usage;;
|
||||||
|
esac
|
||||||
|
[ -z "${REF}" ] && usage
|
||||||
|
|
||||||
|
cd $(dirname $0)/..
|
||||||
|
exec git subtree pull -P "${DIR}" "${REPO}" "${REF}"
|
Loading…
Reference in New Issue