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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 fi | 218 fi |
220 | 219 |
221 # launcher script and symlink | 220 # launcher script and symlink |
222 process_template "${BUILDDIR}/installer/common/wrapper" \ | 221 process_template "${BUILDDIR}/installer/common/wrapper" \ |
223 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}" | 222 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}" |
224 chmod 755 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}" | 223 chmod 755 "${STAGEDIR}/${INSTALLDIR}/${PACKAGE}" |
225 if [ ! -f "${STAGEDIR}/${INSTALLDIR}/google-chrome" ]; then | 224 if [ ! -f "${STAGEDIR}/${INSTALLDIR}/google-chrome" ]; then |
226 ln -sn "${INSTALLDIR}/${PACKAGE}" \ | 225 ln -sn "${INSTALLDIR}/${PACKAGE}" \ |
227 "${STAGEDIR}/${INSTALLDIR}/google-chrome" | 226 "${STAGEDIR}/${INSTALLDIR}/google-chrome" |
228 fi | 227 fi |
| 228 ln -snf "${INSTALLDIR}/${PACKAGE}" \ |
| 229 "${STAGEDIR}/usr/bin/${USR_BIN_SYMLINK_NAME}" |
229 | 230 |
230 # app icons | 231 # app icons |
231 install -m 644 \ | 232 install -m 644 \ |
232 "${BUILDDIR}/installer/theme/product_logo_"*.png \ | 233 "${BUILDDIR}/installer/theme/product_logo_"*.png \ |
233 "${BUILDDIR}/installer/theme/product_logo_32.xpm" \ | 234 "${BUILDDIR}/installer/theme/product_logo_32.xpm" \ |
234 "${STAGEDIR}/${INSTALLDIR}/" | 235 "${STAGEDIR}/${INSTALLDIR}/" |
235 | 236 |
236 # desktop integration | 237 # desktop integration |
237 install -m 755 "${BUILDDIR}/xdg-mime" "${STAGEDIR}${INSTALLDIR}/" | 238 install -m 755 "${BUILDDIR}/xdg-mime" "${STAGEDIR}${INSTALLDIR}/" |
238 install -m 755 "${BUILDDIR}/xdg-settings" "${STAGEDIR}${INSTALLDIR}/" | 239 install -m 755 "${BUILDDIR}/xdg-settings" "${STAGEDIR}${INSTALLDIR}/" |
239 process_template "${BUILDDIR}/installer/common/desktop.template" \ | 240 process_template "${BUILDDIR}/installer/common/desktop.template" \ |
240 "${STAGEDIR}/usr/share/applications/${PACKAGE}.desktop" | 241 "${STAGEDIR}/usr/share/applications/${PACKAGE}.desktop" |
241 chmod 644 "${STAGEDIR}/usr/share/applications/${PACKAGE}.desktop" | 242 chmod 644 "${STAGEDIR}/usr/share/applications/${PACKAGE}.desktop" |
242 process_template "${BUILDDIR}/installer/common/default-app.template" \ | 243 process_template "${BUILDDIR}/installer/common/default-app.template" \ |
243 "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}.xml" | 244 "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}.xml" |
244 chmod 644 "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}.
xml" | 245 chmod 644 "${STAGEDIR}/usr/share/gnome-control-center/default-apps/${PACKAGE}.
xml" |
245 process_template "${BUILDDIR}/installer/common/default-app-block.template" \ | 246 process_template "${BUILDDIR}/installer/common/default-app-block.template" \ |
246 "${STAGEDIR}${INSTALLDIR}/default-app-block" | 247 "${STAGEDIR}${INSTALLDIR}/default-app-block" |
247 chmod 644 "${STAGEDIR}${INSTALLDIR}/default-app-block" | 248 chmod 644 "${STAGEDIR}${INSTALLDIR}/default-app-block" |
248 | 249 |
249 # documentation | 250 # documentation |
250 install -m 755 "${BUILDDIR}/${PROGNAME}.1" \ | 251 install -m 755 "${BUILDDIR}/${PROGNAME}.1" \ |
251 "${STAGEDIR}/usr/share/man/man1/${PACKAGE}.1" | 252 "${STAGEDIR}/usr/share/man/man1/${PACKAGE}.1" |
252 } | 253 } |
OLD | NEW |