diff --git a/bin/bamc b/bin/bamc index 21b654f..02dd6e8 100755 --- a/bin/bamc +++ b/bin/bamc @@ -1,39 +1,39 @@ #!/bin/bash # Set SNAME, SDIR and SPATH if [ -h $0 ]; then SNAME=$(readlink $0); else SNAME=$0; fi SDIR=$(dirname $SNAME) -if [[ "$SDIR" =~ ^/ ]]; then SPATH=$SDIR; else SPATH=$(realpath $(pwd)/$SDIR); fi +if [[ "$SDIR" =~ ^/ ]]; then SPATH=$SDIR; else SPATH=$(realpath $(dirname $0)/$SDIR); fi # Set DIR_LIB DIR_LIB=$(realpath $SPATH/../lib/bash) # Source libs source $DIR_LIB/tools.sh source $DIR_LIB/colors.sh source $DIR_LIB/io.sh source $DIR_LIB/debugging.sh source $DIR_LIB/cmdline_parser.sh source $DIR_LIB/bamc_configuration.sh source $DIR_LIB/bamc_sanity.sh source $DIR_LIB/bamc_help.sh source $DIR_LIB/bamc_workspace.sh source $DIR_LIB/bamc_questions.sh source $DIR_LIB/bamc_exams.sh source $DIR_LIB/bamc_templates.sh source $DIR_LIB/bamc_projects.sh source $DIR_LIB/bamc_students.sh source $DIR_LIB/bamc_amc-commands.sh # Set some variables DEFAULT_ITEMS=$(get_exam_list) DEFAULT_ACTIONS="help" CALLBACK_PREFIX="action_" # Run! run $@ # RIP exit $? #EOF