diff --git a/install b/install index 3df7405..0368569 100755 --- a/install +++ b/install @@ -9,7 +9,9 @@ if ! command -v path-wizard > /dev/null 2>&1; then $SCRIPT_DIR/spells/path-wizard add $SCRIPT_DIR/spells/cantrips $SCRIPT_DIR/spells/path-wizard add $SCRIPT_DIR/spells/menu $SCRIPT_DIR/spells/path-wizard add $SCRIPT_DIR/spells/menu/bitcoin - echo "Your spellbook has been activated, please open a fresh terminal now." + echo "" + echo "Activating your spellbook now." + $SHELL exit 0 else echo "Ok, well the mud won't work until you install it by adding the spells directory to your PATH." diff --git a/spells/path-wizard b/spells/path-wizard index 7117d31..623c9cb 100755 --- a/spells/path-wizard +++ b/spells/path-wizard @@ -32,7 +32,7 @@ else directory=$(pwd -P) else # If the directory is a relative path, convert it to an absolute path - if [ "${directory:0:1}" != "/" ]; then + if [ "$(echo $directory | cut -c1)" != "/" ]; then directory=$(cd "$directory" && pwd -P) fi fi @@ -78,4 +78,4 @@ if [ "$action" = "add" ]; then echo "The changes to your PATH will not take effect until you open a new terminal or run the 'source ~/.bashrc' command in your current terminal." else echo "The changes to your PATH will not take effect until you open a new terminal." -fi \ No newline at end of file +fi