-
Notifications
You must be signed in to change notification settings - Fork 2
/
buildpush.sh
executable file
·37 lines (31 loc) · 1.27 KB
/
buildpush.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package_name=google-talkplugin
repo_name=apricity-core
repo_endpoint=apricity-core-signed
while getopts 'P:R:E:h' arg; do
case "${arg}" in
P) package_name="${OPTARG}" ;;
R) repo_name="${OPTARG}" ;;
E) repo_endpoint="${OPTARG}" ;;
*)
echo "Invalid argument '${arg}'" ;;
esac
done
rm -rf build
mkdir -p build
cd build
yaourt -G ${package_name}
cd ${package_name}
sudo pacman -Syy
makepkg -sr --sign --clean --needed --noconfirm 2>&1 | tee ${package_name}.log
wget static.apricityos.com/${repo_endpoint}/${repo_name}.db
wget static.apricityos.com/${repo_endpoint}/${repo_name}.db.tar.gz
wget static.apricityos.com/${repo_endpoint}/${repo_name}.files
wget static.apricityos.com/${repo_endpoint}/${repo_name}.files.tar.gz
repo-add --sign ${repo_name}.db.tar.gz *.pkg.tar.xz
scp ${repo_name}.db* [email protected]:/mnt/repo/public_html/${repo_endpoint}/
scp ${repo_name}.files* [email protected]:/mnt/repo/public_html/${repo_endpoint}/
scp ./*.pkg.tar.xz [email protected]:/mnt/repo/public_html/${repo_endpoint}/
scp ./*.pkg.tar.xz.sig [email protected]:/mnt/repo/public_html/${repo_endpoint}/
scp ${package_name}.log [email protected]:/mnt/repo/public_html/${repo_endpoint}/
cd ../..
rm -rf build