|
18 | 18 |
|
19 | 19 | apt-mirror |
20 | 20 |
|
21 | | -mkdir /workdir |
22 | | -cd /workdir |
| 21 | +APPSTREAM_DIR=/workdir |
| 22 | +mkdir ${APPSTREAM_DIR} |
| 23 | +pushd ${APPSTREAM_DIR} |
23 | 24 |
|
24 | 25 | cat <<EOF > asgen-config.json |
25 | 26 | { |
|
40 | 41 |
|
41 | 42 | appstream-generator process ${DIST} |
42 | 43 |
|
| 44 | +popd |
| 45 | + |
43 | 46 | # Clear out the old data |
44 | | -rm -rf /repo/pantheon-data/main/* |
45 | | -rm -f /repo/debian/appstream-data-pantheon-icons-hidpi.install |
46 | | -rm -f /repo/debian/appstream-data-pantheon-icons.install |
47 | | -touch /repo/debian/appstream-data-pantheon-icons-hidpi.install |
48 | | -touch /repo/debian/appstream-data-pantheon-icons.install |
| 47 | +rm -rf pantheon-data/main/* |
| 48 | +rm -f debian/appstream-data-pantheon-icons-hidpi.install |
| 49 | +rm -f debian/appstream-data-pantheon-icons.install |
| 50 | +touch debian/appstream-data-pantheon-icons-hidpi.install |
| 51 | +touch debian/appstream-data-pantheon-icons.install |
49 | 52 |
|
50 | 53 | # Copy in the new |
51 | | -cp export/data/${DIST}/main/Components-amd64.yml.gz /repo/pantheon-data/main/pantheon_${DIST}-main_amd64.yml.gz |
52 | | -for f in export/data/${DIST}/main/icons-*; do |
| 54 | +cp ${APPSTREAM_DIR}/export/data/${DIST}/main/Components-amd64.yml.gz pantheon-data/main/pantheon_${DIST}-main_amd64.yml.gz |
| 55 | +for f in ${APPSTREAM_DIR}/export/data/${DIST}/main/icons-*; do |
53 | 56 |
|
54 | 57 | # Ignore icon archives with no icons |
55 | 58 | FILECOUNT=$(tar -tzvvf ${f} | grep -c ^-) || true |
56 | 59 | [[ $FILECOUNT -gt 0 ]] || continue |
57 | 60 |
|
58 | 61 | # Strip a path like export/data/bionic/main/icons-128x128@2.tar.gz down to 128x128@2 |
59 | 62 | OUTDIR=`basename ${f} .tar.gz | cut -d- -f2` |
60 | | - mkdir -p /repo/pantheon-data/main/icons/${OUTDIR} |
61 | | - tar -C /repo/pantheon-data/main/icons/${OUTDIR} -xf ${f} |
| 63 | + mkdir -p pantheon-data/main/icons/${OUTDIR} |
| 64 | + tar -C pantheon-data/main/icons/${OUTDIR} -xf ${f} |
62 | 65 |
|
63 | 66 | # Add the extracted directory path to the debian install scripts (either HiDPI or not) |
64 | 67 | if [[ $OUTDIR == *"@2" ]]; then |
65 | | - echo "pantheon-data/main/icons/${OUTDIR}/* usr/share/app-info/icons/elementary-${CHANNEL}-${DIST}-main/$OUTDIR/" >> /repo/debian/appstream-data-pantheon-icons-hidpi.install |
| 68 | + echo "pantheon-data/main/icons/${OUTDIR}/* usr/share/app-info/icons/elementary-${CHANNEL}-${DIST}-main/$OUTDIR/" >> debian/appstream-data-pantheon-icons-hidpi.install |
66 | 69 | else |
67 | | - echo "pantheon-data/main/icons/${OUTDIR}/* usr/share/app-info/icons/elementary-${CHANNEL}-${DIST}-main/$OUTDIR/" >> /repo/debian/appstream-data-pantheon-icons.install |
| 70 | + echo "pantheon-data/main/icons/${OUTDIR}/* usr/share/app-info/icons/elementary-${CHANNEL}-${DIST}-main/$OUTDIR/" >> debian/appstream-data-pantheon-icons.install |
68 | 71 | fi |
69 | 72 | done |
| 73 | + |
| 74 | +# Change the ownership to the current user |
| 75 | +chown -R $(id -u):$(id -g) pantheon-data |
| 76 | +chown -R $(id -u):$(id -g) debian |
0 commit comments