| OLD | NEW |
| 1 # Recursively replace @@include@@ template variables with the referenced file, | 1 # Recursively replace @@include@@ template variables with the referenced file, |
| 2 # and write the resulting text to stdout. | 2 # and write the resulting text to stdout. |
| 3 process_template_includes() { | 3 process_template_includes() { |
| 4 INCSTACK+="$1->" | 4 INCSTACK+="$1->" |
| 5 # Includes are relative to the file that does the include. | 5 # Includes are relative to the file that does the include. |
| 6 INCDIR=$(dirname $1) | 6 INCDIR=$(dirname $1) |
| 7 # Clear IFS so 'read' doesn't trim whitespace | 7 # Clear IFS so 'read' doesn't trim whitespace |
| 8 local OLDIFS="$IFS" | 8 local OLDIFS="$IFS" |
| 9 IFS='' | 9 IFS='' |
| 10 while read -r LINE | 10 while read -r LINE |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 TMPLINCL="$(process_template_includes "$TMPLIN")" | 51 TMPLINCL="$(process_template_includes "$TMPLIN")" |
| 52 sed \ | 52 sed \ |
| 53 -e "s#@@PACKAGE@@#${PACKAGE}#g" \ | 53 -e "s#@@PACKAGE@@#${PACKAGE}#g" \ |
| 54 -e "s#@@PACKAGE_FILENAME@@#${PACKAGE_FILENAME}#g" \ | 54 -e "s#@@PACKAGE_FILENAME@@#${PACKAGE_FILENAME}#g" \ |
| 55 -e "s#@@PROGNAME@@#${PROGNAME}#g" \ | 55 -e "s#@@PROGNAME@@#${PROGNAME}#g" \ |
| 56 -e "s#@@CHANNEL@@#${CHANNEL}#g" \ | 56 -e "s#@@CHANNEL@@#${CHANNEL}#g" \ |
| 57 -e "s#@@COMPANY_FULLNAME@@#${COMPANY_FULLNAME}#g" \ | 57 -e "s#@@COMPANY_FULLNAME@@#${COMPANY_FULLNAME}#g" \ |
| 58 -e "s#@@VERSION@@#${VERSION}#g" \ | 58 -e "s#@@VERSION@@#${VERSION}#g" \ |
| 59 -e "s#@@PACKAGE_RELEASE@@#${PACKAGE_RELEASE}#g" \ | 59 -e "s#@@PACKAGE_RELEASE@@#${PACKAGE_RELEASE}#g" \ |
| 60 -e "s#@@VERSIONFULL@@#${VERSIONFULL}#g" \ | 60 -e "s#@@VERSIONFULL@@#${VERSIONFULL}#g" \ |
| 61 -e "s#@@INSTALLDIRPREFIX@@#${INSTALLDIRPREFIX}#g" \ | |
| 62 -e "s#@@INSTALLDIR@@#${INSTALLDIR}#g" \ | 61 -e "s#@@INSTALLDIR@@#${INSTALLDIR}#g" \ |
| 63 -e "s#@@BUILDDIR@@#${BUILDDIR}#g" \ | 62 -e "s#@@BUILDDIR@@#${BUILDDIR}#g" \ |
| 64 -e "s#@@STAGEDIR@@#${STAGEDIR}#g" \ | 63 -e "s#@@STAGEDIR@@#${STAGEDIR}#g" \ |
| 65 -e "s#@@SCRIPTDIR@@#${SCRIPTDIR}#g" \ | 64 -e "s#@@SCRIPTDIR@@#${SCRIPTDIR}#g" \ |
| 66 -e "s#@@MENUNAME@@#${MENUNAME}#g" \ | 65 -e "s#@@MENUNAME@@#${MENUNAME}#g" \ |
| 67 -e "s#@@PRODUCTURL@@#${PRODUCTURL}#g" \ | 66 -e "s#@@PRODUCTURL@@#${PRODUCTURL}#g" \ |
| 68 -e "s#@@PREDEPENDS@@#${PREDEPENDS}#g" \ | 67 -e "s#@@PREDEPENDS@@#${PREDEPENDS}#g" \ |
| 69 -e "s#@@DEPENDS@@#${DEPENDS}#g" \ | 68 -e "s#@@DEPENDS@@#${DEPENDS}#g" \ |
| 70 -e "s#@@PROVIDES@@#${PROVIDES}#g" \ | 69 -e "s#@@PROVIDES@@#${PROVIDES}#g" \ |
| 71 -e "s#@@REPLACES@@#${REPLACES}#g" \ | 70 -e "s#@@REPLACES@@#${REPLACES}#g" \ |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 fi | 209 fi |
| 211 | 210 |
| 212 # launcher script and symlink | 211 # launcher script and symlink |
| 213 process_template "${BUILDDIR}/installer/common/wrapper" \ | 212 process_template "${BUILDDIR}/installer/common/wrapper" \ |
| 214 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}" | 213 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}" |
| 215 chmod 755 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}" | 214 chmod 755 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}" |
| 216 if [ ! -f "${STAGEDIR}/${INSTALLDIR}/google-chrome" ]; then | 215 if [ ! -f "${STAGEDIR}/${INSTALLDIR}/google-chrome" ]; then |
| 217 ln -sn "${INSTALLDIR}/${PACKAGE}" \ | 216 ln -sn "${INSTALLDIR}/${PACKAGE}" \ |
| 218 "${STAGEDIR}/${INSTALLDIR}/google-chrome" | 217 "${STAGEDIR}/${INSTALLDIR}/google-chrome" |
| 219 fi | 218 fi |
| 219 ln -snf "${INSTALLDIR}/${PACKAGE}" \ |
| 220 "${STAGEDIR}/usr/bin/${USR_BIN_SYMLINK_NAME}" |
| 220 | 221 |
| 221 # app icons | 222 # app icons |
| 222 install -m 644 \ | 223 install -m 644 \ |
| 223 "${BUILDDIR}/installer/theme/product_logo_"*.png \ | 224 "${BUILDDIR}/installer/theme/product_logo_"*.png \ |
| 224 "${BUILDDIR}/installer/theme/product_logo_32.xpm" \ | 225 "${BUILDDIR}/installer/theme/product_logo_32.xpm" \ |
| 225 "${STAGEDIR}/${INSTALLDIR}/" | 226 "${STAGEDIR}/${INSTALLDIR}/" |
| 226 | 227 |
| 227 # desktop integration | 228 # desktop integration |
| 228 install -m 755 "${BUILDDIR}/xdg-mime" "${STAGEDIR}${INSTALLDIR}/" | 229 install -m 755 "${BUILDDIR}/xdg-mime" "${STAGEDIR}${INSTALLDIR}/" |
| 229 install -m 755 "${BUILDDIR}/xdg-settings" "${STAGEDIR}${INSTALLDIR}/" | 230 install -m 755 "${BUILDDIR}/xdg-settings" "${STAGEDIR}${INSTALLDIR}/" |
| 230 process_template "${BUILDDIR}/installer/common/desktop.template" \ | 231 process_template "${BUILDDIR}/installer/common/desktop.template" \ |
| 231 "${STAGEDIR}/usr/share/applications/${PACKAGE}.desktop" | 232 "${STAGEDIR}/usr/share/applications/${PACKAGE}.desktop" |
| 232 chmod 644 "${STAGEDIR}/usr/share/applications/${PACKAGE}.desktop" | 233 chmod 644 "${STAGEDIR}/usr/share/applications/${PACKAGE}.desktop" |
| 233 process_template "${BUILDDIR}/installer/common/default-app.template" \ | 234 process_template "${BUILDDIR}/installer/common/default-app.template" \ |
| 234 "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}.xml" | 235 "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}.xml" |
| 235 chmod 644 "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}.
xml" | 236 chmod 644 "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}.
xml" |
| 236 process_template "${BUILDDIR}/installer/common/default-app-block.template" \ | 237 process_template "${BUILDDIR}/installer/common/default-app-block.template" \ |
| 237 "${STAGEDIR}${INSTALLDIR}/default-app-block" | 238 "${STAGEDIR}${INSTALLDIR}/default-app-block" |
| 238 chmod 644 "${STAGEDIR}${INSTALLDIR}/default-app-block" | 239 chmod 644 "${STAGEDIR}${INSTALLDIR}/default-app-block" |
| 239 | 240 |
| 240 # documentation | 241 # documentation |
| 241 install -m 755 "${BUILDDIR}/${PROGNAME}.1" \ | 242 install -m 755 "${BUILDDIR}/${PROGNAME}.1" \ |
| 242 "${STAGEDIR}/usr/share/man/man1/${PACKAGE}.1" | 243 "${STAGEDIR}/usr/share/man/man1/${PACKAGE}.1" |
| 243 } | 244 } |
| OLD | NEW |