| OLD | NEW |
| 1 # This bash file is intended to be used for building .deb release files to be | 1 # This bash file is intended to be used for building .deb release files to be |
| 2 # used by pull and push. To use this file just create your own bash file in | 2 # used by pull and push. To use this file just create your own bash file in |
| 3 # which you define the APPNAME and DESCRIPTION vars and the | 3 # which you define the APPNAME and DESCRIPTION vars and the |
| 4 # copy_release_files() function which copies all the files needed in the | 4 # copy_release_files() function which copies all the files needed in the |
| 5 # distribution in ${ROOT}. Then source this file after those definitions. The | 5 # distribution in ${ROOT}. Then source this file after those definitions. The |
| 6 # resulting .deb will be uploaded to Google Storage with the correct metadata. | 6 # resulting .deb will be uploaded to Google Storage with the correct metadata. |
| 7 # | 7 # |
| 8 # Follow Debian conventions for file locations. For example: | 8 # Follow Debian conventions for file locations. For example: |
| 9 # | 9 # |
| 10 # HTML Template files in /usr/local/share/${APPNAME}/ | 10 # HTML Template files in /usr/local/share/${APPNAME}/ |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 Package: skia-${APPNAME} | 69 Package: skia-${APPNAME} |
| 70 Version: 1.0 | 70 Version: 1.0 |
| 71 Depends: ${DEPENDS} | 71 Depends: ${DEPENDS} |
| 72 Architecture: amd64 | 72 Architecture: amd64 |
| 73 Maintainer: ${USERNAME}@${HOST} | 73 Maintainer: ${USERNAME}@${HOST} |
| 74 Priority: optional | 74 Priority: optional |
| 75 Description: ${DESCRIPTION} | 75 Description: ${DESCRIPTION} |
| 76 EOF | 76 EOF |
| 77 | 77 |
| 78 cat <<-EOF > ${ROOT}/DEBIAN/postinst | 78 cat <<-EOF > ${ROOT}/DEBIAN/postinst |
| 79 #!/bin/sh | 79 #!/bin/bash |
| 80 INIT_SCRIPT="${INIT_SCRIPT}" | 80 INIT_SCRIPT="${INIT_SCRIPT}" |
| 81 set -e | 81 set -e |
| 82 if [ -e /bin/systemctl ] | 82 if [ -e /bin/systemctl ] |
| 83 then | 83 then |
| 84 /bin/systemctl daemon-reload | 84 /bin/systemctl daemon-reload |
| 85 /bin/systemctl enable ${SYSTEMD} | 85 /bin/systemctl enable ${SYSTEMD} |
| 86 /bin/systemctl restart ${SYSTEMD} | 86 /bin/systemctl restart ${SYSTEMD} |
| 87 elif [ -z \$INIT_SCRIPT ] | 87 elif [ ! -z "\$INIT_SCRIPT" ] |
| 88 then | 88 then |
| 89 update-rc.d \$INIT_SCRIPT enable | 89 update-rc.d \$INIT_SCRIPT enable |
| 90 service $INIT_SCRIPT start | 90 service $INIT_SCRIPT start |
| 91 fi | 91 fi |
| 92 EOF | 92 EOF |
| 93 chmod 755 ${ROOT}/DEBIAN/postinst | 93 chmod 755 ${ROOT}/DEBIAN/postinst |
| 94 | 94 |
| 95 copy_release_files | 95 copy_release_files |
| 96 | 96 |
| 97 if [ ! -v BYPASS_GENERATION ] | 97 if [ ! -v BYPASS_GENERATION ] |
| (...skipping 25 matching lines...) Expand all Loading... |
| 123 -h x-goog-meta-hash:${HASH} \ | 123 -h x-goog-meta-hash:${HASH} \ |
| 124 -h x-goog-meta-datetime:${DATETIME} \ | 124 -h x-goog-meta-datetime:${DATETIME} \ |
| 125 -h x-goog-meta-dirty:${DIRTY} \ | 125 -h x-goog-meta-dirty:${DIRTY} \ |
| 126 -h "x-goog-meta-note:$1" \ | 126 -h "x-goog-meta-note:$1" \ |
| 127 -h "x-goog-meta-services:${SYSTEMD}" \ | 127 -h "x-goog-meta-services:${SYSTEMD}" \ |
| 128 cp ${OUT}/${APPNAME}.deb \ | 128 cp ${OUT}/${APPNAME}.deb \ |
| 129 gs://skia-push/debs/${APPNAME}/${APPNAME}:${USERID}:${DATETIME}:${HASH}.deb | 129 gs://skia-push/debs/${APPNAME}/${APPNAME}:${USERID}:${DATETIME}:${HASH}.deb |
| 130 else | 130 else |
| 131 echo "Upload bypassed." | 131 echo "Upload bypassed." |
| 132 fi | 132 fi |
| OLD | NEW |