* portability use /usr/bin/env bash

* add_personality - fix path since following instructions in readme leads to the personalities being installed outside of project folder
This commit is contained in:
mitchell amihod 2023-05-22 21:43:09 -04:00
parent 35d6c3a08b
commit 712259f869
2 changed files with 5 additions and 6 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Clone the repository to a tmp folder
REPO_URL="https://github.com/ParisNeo/PyAIPersonality.git"
@ -39,8 +39,7 @@ read -p "Enter the number of the desired personality: " SELECTED_PERSONALITY
PERSONALITY_FOLDER="$PERSONALITIES_FOLDER/${PERSONALITIES[$SELECTED_PERSONALITY]}"
# Copy the selected personality folder to personalities/language/category folder
CORRECTED_PATH="$(pwd)/.."
OUTPUT_FOLDER="$CORRECTED_PATH/personalities/${LANGUAGES[$SELECTED_LANGUAGE]}/${CATEGORIES[$SELECTED_CATEGORY]}/${PERSONALITIES[$SELECTED_PERSONALITY]}"
OUTPUT_FOLDER="$(pwd)/personalities/${LANGUAGES[$SELECTED_LANGUAGE]}/${CATEGORIES[$SELECTED_CATEGORY]}/${PERSONALITIES[$SELECTED_PERSONALITY]}"
mkdir -p "$OUTPUT_FOLDER"
cp -r "$PERSONALITY_FOLDER/." "$OUTPUT_FOLDER"

View File

@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/env bash
echo "HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH"
echo "HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH"
echo "HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH"
@ -52,9 +52,9 @@ if ping -q -c 1 google.com >/dev/null 2>&1; then
fi
fi
# Check if repository exists
# Check if repository exists
if [[ -d .git ]] ;then
echo Pulling latest changes
echo Pulling latest changes
git pull origin main
else
if [[ -d GPT4All ]] ;then