summaryrefslogtreecommitdiff
path: root/bin/athena-apt-add
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2018-06-24 15:42:41 +0100
committerSean Whitton <spwhitton@spwhitton.name>2018-06-24 15:42:41 +0100
commitcc9121addbacf87f137d5192d6a82805b5e151d0 (patch)
treeff5180eb63c1421c65b384d890bce95f5db02850 /bin/athena-apt-add
parent6d2c224b452eb96a5001781229563779647b796d (diff)
downloaddotfiles-cc9121addbacf87f137d5192d6a82805b5e151d0.tar.gz
add athena-apt-add script
Diffstat (limited to 'bin/athena-apt-add')
-rwxr-xr-xbin/athena-apt-add23
1 files changed, 23 insertions, 0 deletions
diff --git a/bin/athena-apt-add b/bin/athena-apt-add
new file mode 100755
index 00000000..0346fa54
--- /dev/null
+++ b/bin/athena-apt-add
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# add to my personal apt repo; assumes .changes has right distribution
+
+set -e
+
+changes="$(readlink -f $1)"
+dist="$(grep ^Distribution: $changes | cut -d \ -f2)"
+
+if ! [ -d "$HOME/lib/athena-apt" ]; then
+ echo >&2 "athena-apt annex not checked out"
+ exit 1
+fi
+if ! [ -f "$changes" ]; then
+ echo >&2 "changes file specified does not exist"
+ exit 1
+fi
+
+changestool "$changes" includeallsources || true
+(
+ cd "$HOME/lib/athena-apt"
+ reprepro include "$dist" "$changes"
+)