-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
39 lines (27 loc) · 884 Bytes
/
build.sh
File metadata and controls
39 lines (27 loc) · 884 Bytes
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
#!/usr/bin/env bash
working_dir=$(mktemp -d)
repo_dir=${PWD}
(
cd "${working_dir}"
while read package; do
echo "${package}" | grep "^https://" && {
url="${package}"
package=$(basename "${package}")
wget "${url}"
dpkg -x "${package}" .
rm "${package}"
} || {
wget "https://github.com/Tiger-OperatingSystem/${package}/releases/download/continuous/${package}.deb"
dpkg -x "${package}.deb" .
rm "${package}.deb"
}
done < "${repo_dir}/packages.txt"
mkdir -p var/tiger-update/
date +%y.%m.%d%H%M%S > var/tiger-update/version
tar -cvf ../update-pack.tar.gz ./*
chmod 777 ../update-pack.tar.gz
rm index.html
)
mv /tmp/update-pack.tar.gz tiger-update-package.tgz
cp "${working_dir}/var/tiger-update/version" CURRENT
# sudo tar --same-permissions --same-owner -xzvf tiger-update-package.tgz -C /