File: subtree_pull.sh

package info (click to toggle)
feedreader 2.10.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 11,580 kB
  • sloc: ansic: 11,948; xml: 879; php: 177; python: 35; sh: 32; makefile: 28
file content (21 lines) | stat: -rwxr-xr-x 568 bytes parent folder | download | duplicates (2)
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