This repository was archived by the owner on Jul 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ cp $SOURCE_BINARY_PATH installer/$DESTINATION_BINARY_NAME
1414export DESTINATION_BINARY_NAME
1515cp postinstall Scripts/postinstall
1616sed -i ' ' " 3s/.*/DESTINATION_BINARY_NAME=$DESTINATION_BINARY_NAME /" Scripts/postinstall
17+ sed -i ' ' " 4s/.*/DATA_FOLDER_NAME=$DATA_FOLDER_NAME /" Scripts/postinstall
18+ sed -i ' ' " 5s/.*/CONFIGURATION_FILE_NAME=$CONFIGURATION_FILE_NAME /" Scripts/postinstall
1719chmod +x Scripts/postinstall
1820
1921export DATA_FOLDER_NAME CONFIGURATION_FILE_NAME UNINSTALLER_FILE_NAME
Original file line number Diff line number Diff line change 11#! /usr/bin/env sh
22set -e
33DESTINATION_BINARY_NAME=cortex
4- USER_TO_RUN_AS=${SUDO_USER:- $(whoami)}
5- echo " Download cortex.llamacpp engines by default"
4+ DATA_FOLDER_NAME=.cortex
5+ CONFIGURATION_FILE_NAME=.cortexrc
6+
7+ USER_TO_RUN_AS=$( stat -f " %Su" /dev/console)
8+
9+ echo " Download cortex.llamacpp engines by default for user $USER_TO_RUN_AS "
610sudo -u $USER_TO_RUN_AS /usr/local/bin/$DESTINATION_BINARY_NAME engines install cortex.llamacpp
711
12+ sudo chown -R $USER_TO_RUN_AS :staff " /Users/$USER_TO_RUN_AS /$DATA_FOLDER_NAME "
13+ sudo chown $USER_TO_RUN_AS :staff " /Users/$USER_TO_RUN_AS /$CONFIGURATION_FILE_NAME "
14+
815exit 0
You can’t perform that action at this time.
0 commit comments