diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
commit | 698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch) | |
tree | 173a775858bd501c378080a10dca74132f05bc50 /src/etc/installer/pkg/postinstall | |
parent | Initial commit. (diff) | |
download | rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip |
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/etc/installer/pkg/postinstall')
-rwxr-xr-x | src/etc/installer/pkg/postinstall | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/etc/installer/pkg/postinstall b/src/etc/installer/pkg/postinstall new file mode 100755 index 000000000..fb035a486 --- /dev/null +++ b/src/etc/installer/pkg/postinstall @@ -0,0 +1,26 @@ +#!/bin/sh + +source_dir="$(dirname "$0")" +dest_dir="$2" +package_id="$INSTALL_PKG_SESSION_ID" + +if [ -z "$source_dir" ]; then + exit 1 +fi +if [ -z "$dest_dir" ]; then + exit 1 +fi +if [ -z "$package_id" ]; then + exit 1 +fi + +if [ "$package_id" = "org.rust-lang.uninstall" ]; then + if [ ! -e "$dest_dir/lib/rustlib/uninstall.sh" ]; then + exit 1 + fi + sh "$dest_dir/lib/rustlib/uninstall.sh" +else + sh "$source_dir/install.sh" --prefix="$dest_dir" +fi + +exit 0 |