Skip to content

Commit

Permalink
Fix relative paths
Browse files Browse the repository at this point in the history
  • Loading branch information
MizterB committed Sep 24, 2020
1 parent 2d0cd61 commit 12794d0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions retropie_setup_ubuntu.sh
Expand Up @@ -3,8 +3,9 @@
# Computed variables
USER="$SUDO_USER"
USER_HOME="/home/$USER"
SCRIPT_DIR="$(pwd)"
SCRIPT_FILE="$(basename $0)"
SCRIPT_PATH="$(realpath $0)"
SCRIPT_DIR="$(dirname $SCRIPT_PATH)"
SCRIPT_FILE="$(basename $SCRIPT_PATH)"
LOG_FILE="$SCRIPT_DIR/$(basename $0 .sh)-$(date +"%Y%m%d_%H%M%S").log"
OPTIONAL_SCRIPT_DIR="$SCRIPT_DIR/optional_scripts"

Expand Down Expand Up @@ -434,7 +435,7 @@ function set_resolution_grub() {

# Run any optional scripts that the user has provided
function run_optional_scripts() {
SCRIPT_PATH=$OPTIONAL_SCRIPT_DIR/$1
SCRIPT_PATH=$1
# If a specific file is provided, just run that
if [[ -f $SCRIPT_PATH ]]; then
SCRIPT_FILE_PATH=$SCRIPT_PATH
Expand Down

0 comments on commit 12794d0

Please sign in to comment.