-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapricity_buildpush.sh
executable file
·39 lines (33 loc) · 1.45 KB
/
apricity_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
38
39
package_name=apricityassets
repo_name=apricity-core
repo_endpoint=apricity-core-signed
dev=""
while getopts 'P:sdh' arg; do
case "${arg}" in
P) package_name="${OPTARG}" ;;
s) dev="" repo_name="apricity-core" repo_endpoint="apricity-core-signed" ;;
d) dev="-dev" repo_name="apricity-core-dev" repo_endpoint="apricity-core-dev" ;;
*)
echo "Invalid argument '${arg}'" ;;
esac
done
rm -rf build
mkdir -p build
cd build
git clone https://github.com/Apricity-OS/apricity-packages${dev}
cd apricity-packages${dev}
cd ${package_name}
sudo pacman -Syu --noconfirm
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