summaryrefslogtreecommitdiff
path: root/bin/upstream-remote-from-copyright
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-07-21 16:41:36 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-07-21 16:51:31 -0700
commitd599d7837c55c7f51ff2b2efbdd80b27a85ae4ec (patch)
tree5385a1d3b5d869b0f3808946fb0fb03ccbbded6d /bin/upstream-remote-from-copyright
parent66fae9d8471ed400a529a65d2ce06a794e57baa2 (diff)
downloaddotfiles-d599d7837c55c7f51ff2b2efbdd80b27a85ae4ec.tar.gz
make upstream-remote-from-copyright a script
Diffstat (limited to 'bin/upstream-remote-from-copyright')
-rwxr-xr-xbin/upstream-remote-from-copyright5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/upstream-remote-from-copyright b/bin/upstream-remote-from-copyright
new file mode 100755
index 00000000..3873c3cf
--- /dev/null
+++ b/bin/upstream-remote-from-copyright
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+toplevel="$(git rev-parse --show-toplevel)"
+source="$(grep ^Source: $toplevel/debian/copyright | awk -F': ' '{print $2}')"
+git remote add -f upstream "$source"