Skip to content

Commit 35e8031

Browse files
committed
Try removing some more hard-coded names.
1 parent 0319799 commit 35e8031

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

assets/post_install_macOS.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
#!/bin/bash
22

33
# This script must be marked +x to work correctly with the installer!
4+
#
5+
# Available variables are those exported in:
6+
# https://github.com/conda/constructor/blob/main/constructor/header.sh
47

58
set -eo pipefail
69

7-
logger -p 'install.info' "ℹ️ Running the custom Scientific Python post-install script."
10+
logger -p 'install.info' "ℹ️ Running the custom ${INSTALLER_NAME} post-install script."
811

912
# This doesn't appear to be working: even when the installer is run through
1013
# sudo, SUDO_USER is unset. Leave it here for reference:
@@ -28,13 +31,14 @@ else
2831
APP_DIR="$HOME"/Applications
2932
PERMS=""
3033
fi
31-
PKG_APP_DIR="${APP_DIR}/Scientific-Python"
34+
PKG_APP_DIR="${APP_DIR}/${INSTALLER_NAME}"
3235
logger -p 'install.info' "📓 PKG_APP_DIR=$PKG_APP_DIR"
3336

34-
logger -p 'install.info' "ℹ️ Moving root SP .app bundles from $APP_DIR to $PKG_APP_DIR."
35-
$PERMS mv "$APP_DIR"/Scientific\ Python\ *.app "$PKG_APP_DIR"/
37+
logger -p 'install.info' "ℹ️ Moving root project .app bundles from $APP_DIR to $PKG_APP_DIR."
38+
# Set this to match the names generated from the menu package.
39+
$PERMS mv "${APP_DIR}"/Scientific\ Python\ *.app "$PKG_APP_DIR"/
3640

37-
logger -p 'install.info' "ℹ️ Fixing permissions of SP .app bundles in $PKG_APP_DIR: new owner will be ${USER_FROM_HOMEDIR}."
41+
logger -p 'install.info' "ℹ️ Fixing permissions of project .app bundles in $PKG_APP_DIR: new owner will be ${USER_FROM_HOMEDIR}."
3842
$PERMS chown -R "$USER_FROM_HOMEDIR" "$PKG_APP_DIR"
3943

4044
PKG_ICON_PATH="${PREFIX}/Menu/spi_mac_folder_icon.png"

0 commit comments

Comments
 (0)