add a launcher to symlink to $HOME/bin or whatever u have

This commit is contained in:
Cyberes 2024-02-01 15:07:55 -07:00
parent 28a139f0f6
commit 6dd5c83c38
2 changed files with 12 additions and 1 deletions

11
launcher.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
SOURCE=${BASH_SOURCE[0]}
while [ -L "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )
SOURCE=$(readlink "$SOURCE")
[[ $SOURCE != /* ]] && SOURCE=$DIR/$SOURCE # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )
$DIR/venv/bin/python $DIR/run.py

View File

@ -8,7 +8,7 @@ import psutil
def load_personality(name: str, personality: str, system: str, pronoun: str, special_instructions: str = None):
if pronoun.lower() not in ['she', 'he']:
if pronoun.lower() not in ['he', 'she']:
raise Exception('There are only two genders, xir...')
if special_instructions: