diff options
author | wereii | 2021-07-21 14:46:54 +0200 |
---|---|---|
committer | wereii | 2021-07-21 14:59:35 +0200 |
commit | bb102c0b560eddfb8c2d3c24a4228a3f469434b4 (patch) | |
tree | ffc12b263325fa8d237816ebfd483587eaeac806 /nomachine-client.install | |
parent | d2c9513f94c12518809f8a1cd1dc946076786f09 (diff) | |
download | aur-bb102c0b560eddfb8c2d3c24a4228a3f469434b4.tar.gz |
Repair installation process
- Move back from /opt to /usr (/usr/share) and using upstream
installation scripts
- Their install scripts do pollute the system with files not
tracked by the package manager that might not get properly
deleted/cleaned, though it's too convoluted to safely recreate
within pkgbuild
Diffstat (limited to 'nomachine-client.install')
-rw-r--r-- | nomachine-client.install | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/nomachine-client.install b/nomachine-client.install new file mode 100644 index 000000000000..d397d7c91c7b --- /dev/null +++ b/nomachine-client.install @@ -0,0 +1,40 @@ +_invoke() { + # arg1: --install | --update | --uninstall + # NX_INSTALL_DEBUG=1 + NX_INSTALL_PREFIX=/usr/share /usr/share/NX/scripts/setup/nxclient "$1" arch +} + + +_check_remove_old_prefix() +{ + if [ -d /usr/NX ]; then + echo "Old installation (/usr) found, removing" + + if [ -x /usr/NX/scripts/setup/nxclient ]; then + NX_INSTALL_PREFIX=/usr /usr/NX/scripts/setup/nxclient --uninstall fedora + fi + + rm -rf /usr/NX + fi +} + +post_install() +{ + echo "Running NX post_install script ..." + _invoke --install +} + +pre_remove() +{ + echo "Running NX pre_remove script ..." + _invoke --uninstall +} + + +post_upgrade() +{ + echo "Running NX post_upgrade script ..." + _check_remove_old_prefix + chmod +x /usr/share/NX/scripts/restricted/nxusb.sh || true + _invoke --update +} |