summaryrefslogtreecommitdiff
path: root/bin/athena-apt-add
blob: 0346fa54660e75a32e5d0d85a4d2b324a061dcb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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"
)