blob: aaa3ae6a221c9a9a00603398b5ed1582c0e7764b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/bash
if [[ "$1" == "grabberconfig" ]]; then
prefix=data/GrabberConfig
upstream=https://github.com/fivefilters/ftr-site-config.git
elif [[ "$1" == "libdecsync" ]]; then
prefix=plugins/backend/decsync/libdecsync
upstream=https://github.com/39aldo39/libdecsync-vala.git
else
echo "Usage: $0 [grabberconfig|libdecsync]"
echo "Pulls the latest changes for the given subtree"
exit 1
fi
# Pull if the subtree exists, create if it doesn't
if [[ -d "$prefix" ]]; then
cmd=pull
else
cmd=add
fi
git subtree "$cmd" --prefix "$prefix" "$upstream" master --squash
|