mirror of
https://github.com/arkenfox/user.js.git
synced 2025-05-01 06:23:34 +02:00
fix PROFILE_PATH variable
This commit is contained in:
parent
f185193c33
commit
638523aae0
1 changed files with 2 additions and 2 deletions
|
@ -124,7 +124,7 @@ readIniFile () { # expects one argument: absolute path of profiles.ini
|
|||
declare -r inifile="$1"
|
||||
|
||||
# tempIni will contain: [ProfileX], Name=, IsRelative= and Path= of the only (if) or the selected (else) profile
|
||||
if [ $(grep -c '^\[Profile' "${inifile}") == "1" ]; then ### only 1 profile found
|
||||
if [ "$(grep -c '^\[Profile' "${inifile}")" == "1" ]; then ### only 1 profile found
|
||||
tempIni="$(grep '^\[Profile' -A 4 "${inifile}")"
|
||||
else
|
||||
echo 'Profiles found:'
|
||||
|
@ -143,7 +143,7 @@ readIniFile () { # expects one argument: absolute path of profiles.ini
|
|||
# extracting only the path itself, excluding "Path="
|
||||
PROFILE_PATH=$(echo "${tempIni}" | sed -n 's/^Path=\(.*\)$/\1/p')
|
||||
# update global variable if path is relative
|
||||
[[ ${pathisrel} == "1" ]] && PROFILE_PATH="$(dirname "${inifile}")/${profpath}"
|
||||
[[ ${pathisrel} == "1" ]] && PROFILE_PATH="$(dirname "${inifile}")/${PROFILE_PATH}"
|
||||
}
|
||||
|
||||
getProfilePath () {
|
||||
|
|
Loading…
Add table
Reference in a new issue