diff options
author | Damien Flament | 2017-08-26 09:05:36 +0200 |
---|---|---|
committer | Damien Flament | 2017-08-26 09:05:36 +0200 |
commit | 609047617a772ce6aeec8283a624498277c3d5de (patch) | |
tree | 0aded3e0a833e6a7645447c8a6fdd2add6de9ba2 /PKGBUILD | |
parent | 369293d32d4186e08565a295532df94be3d07bd2 (diff) | |
download | aur-609047617a772ce6aeec8283a624498277c3d5de.tar.gz |
Stored custom startup script in a file within the tarball
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 21 |
1 files changed, 4 insertions, 17 deletions
@@ -21,7 +21,7 @@ changelog= source=('voxelshop' "https://github.com/simlu/voxelshop/releases/download/${pkgver}/VoxelShop-java-all-os-fast.zip") noextract=() -sha256sums=('69ff1076bf585855c81862b06bf50bd67621ac435d0c0f4a2ac3d19aa31317aa' +sha256sums=('0158a4e52afc88c9d9c6341f50c237383e1781c18a25060c93989877e2f71aa7' '86c1fd50ef32b17be92df37d6a5c2206e456d99bc7abe4da80a44f49d2a377d3') arch=('any') @@ -32,23 +32,10 @@ package() { install -Dm755 -t "${pkgdir}/opt/${pkgname}" data/* # Generate the startup script - install -d ${pkgdir}/usr/bin + cd "${srcdir}" + sed -i "s/{{pkgname}}/${pkgname}/g" "${pkgname}" - cat <<_STARTUP_SCRIPT_ >${pkgdir}/usr/bin/${pkgname} -#!/bin/bash - -cd /opt/${pkgname} -declare -r DATA_DIR=\${XDG_DATA_HOME:-"\${HOME}/.local/share"}/${pkgname} - -# Update the Getdown configuration file -install -CDm644 -t "\${DATA_DIR}" getdown.txt - -# Start the application using Getdown -java -jar getdown-client.jar "\${DATA_DIR}" - -_STARTUP_SCRIPT_ - - chmod +x ${pkgdir}/usr/bin/${pkgname} + install -D -t "${pkgdir}/usr/bin" "${pkgname}" # Add a symlink to the startup script using the camel-cased package name ln -s "${pkgname}" "${pkgdir}/usr/bin/${_pkgname_upper}" |