-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcopy-packages.sh
executable file
·70 lines (46 loc) · 1.69 KB
/
copy-packages.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash -e
cd $(dirname "$0")
DIR=$(pwd)
. config
RELEASE="${1}"
V1="${2}"
V2="${3}"
UBUNTU=${RELEASE%%/*}
MINT=${RELEASE#*/}
./make-directories.sh
function redirect_tee {
[ "${REDIRECT}" == '1' ] && tee "$1" || cat
}
cd "${UBUNTU}"
rm -f pool/latest/*.REDIRECT
rm -f 'pool/latest'
mkdir -p 'pool'
cd 'pool'
mkdir -p "chromium_${V2}"
cd "chromium_${V2}"
echo "${REMOTE}chromium_${V2}.tar.xz" | redirect_tee "chromium_${V2}.tar.xz.REDIRECT"
echo
echo "${REMOTE}chromium_${V2}_amd64.deb" | redirect_tee "chromium_${V2}_amd64.deb.REDIRECT"
echo
echo "${REMOTE}chromium-dbg_${V2}_amd64.deb" | redirect_tee "chromium-dbg_${V2}_amd64.deb.REDIRECT"
echo
echo "$(date --utc +%Y-%m-%d) 0" | tee "chromium_${V2}.dsc.DOWNLOADS"
echo "$(date --utc +%Y-%m-%d) 0" | tee "chromium_${V2}.tar.xz.DOWNLOADS"
echo "$(date --utc +%Y-%m-%d) 0" | tee "chromium_${V2}_amd64.deb.DOWNLOADS"
echo "$(date --utc +%Y-%m-%d) 0" | tee "chromium-dbg_${V2}_amd64.deb.DOWNLOADS"
echo
wget -c -o- --progress=dot -e dotbytes=1K "${REMOTE}chromium_${V2}.dsc"
echo
wget -c -o- --progress=dot -e dotbytes=10K "${REMOTE}chromium_${V2}.tar.xz"
echo
wget -c -o- --progress=dot -e dotbytes=1M "${REMOTE}chromium_${V2}_amd64.deb"
echo
wget -c -o- --progress=dot -e dotbytes=1M "${REMOTE}chromium-dbg_${V2}_amd64.deb"
cd ..
"${DIR}/make-repo.sh" "${UBUNTU}"
ln -s "chromium_${V2}" 'latest'
cd ..
cd ..
touch "${UBUNTU}"
touch "${UBUNTU}/pool"
exit 0