File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 11### Unreleased
22
33* Demo: Prevent spaces in theme-info link
4+ * Fix newtheme-popos.sh script location detection
45
56### 9.4.5: 2024-10-25
67
Original file line number Diff line number Diff line change @@ -9,15 +9,21 @@ SCRIPT_VERSION='1.0.0 (2023-09-29)'
99CURRENTFILE=` basename $0 `
1010
1111# Determine scripts location to get imports right
12- if [ " $CURRENTFILE " = " newtheme.sh" ]; then
12+ if [ " $CURRENTFILE " = " newtheme-popos .sh" ]; then
1313 SCRIPTS_LOCATION=" $( pwd ) "
1414 source ${SCRIPTS_LOCATION} /tasks/variables.sh
1515 source ${SCRIPTS_LOCATION} /tasks/header.sh
1616 exit
1717else
1818 DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd ) "
1919 ORIGINAL_FILE=$( readlink $DIR /$CURRENTFILE )
20- SCRIPTS_LOCATION=$( dirname $ORIGINAL_FILE )
20+ # Check if ORIGINAL_FILE is empty before calling dirname
21+ if [ -n " $ORIGINAL_FILE " ]; then
22+ SCRIPTS_LOCATION=$( dirname " $ORIGINAL_FILE " )
23+ else
24+ echo " Error: Could not determine original file location"
25+ exit 1
26+ fi
2127fi
2228
2329# Final note about server requirements
You can’t perform that action at this time.
0 commit comments