mirror of
https://github.com/black7375/Firefox-UI-Fix.git
synced 2026-02-04 06:20:37 -08:00
fix: Profile path no longer being cut off on space
Adjusted calls for setting ini variables to not skip everything after first whitespace as well as adjusted method of reading ini file to not skip them. Refs: #840
This commit is contained in:
parent
a526a818e4
commit
6ef6a381c5
1 changed files with 6 additions and 6 deletions
12
install.sh
12
install.sh
|
|
@ -185,7 +185,7 @@ write_file() {
|
|||
get_ini_section() {
|
||||
local filePath="$1"
|
||||
|
||||
local output=$(grep -E "^\[" "${filePath}" |sed -e "s/^\[//g" -e "s/\]$//g")
|
||||
local output="$(grep -E "^\[" "${filePath}" |sed -e "s/^\[//g" -e "s/\]$//g")"
|
||||
echo "${output}"
|
||||
}
|
||||
get_ini_value() {
|
||||
|
|
@ -195,11 +195,11 @@ get_ini_value() {
|
|||
|
||||
local output=""
|
||||
if [ "${section}" == "" ]; then
|
||||
output=$(grep -E "^${key}" "${filePath}" | cut -f 2 -d"=")
|
||||
output="$(grep -E "^${key}" "${filePath}" | cut -f 2 -d"=")"
|
||||
echo "${output}"
|
||||
else
|
||||
local sectionStart=""
|
||||
for line in $(cat "${filePath}"); do
|
||||
while IFS= read line; do
|
||||
if [[ "${sectionStart}" == "true" && "${line}" == "["* ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
|
@ -209,12 +209,12 @@ get_ini_value() {
|
|||
fi
|
||||
|
||||
if [ "${sectionStart}" == "true" ]; then
|
||||
output=$(echo "${line}" | grep -E "^${key}" | cut -f 2 -d"=" )
|
||||
output="$(echo "${line}" | grep -E "^${key}" | cut -f 2 -d"=" )"
|
||||
if [ "${output}" != "" ]; then
|
||||
echo "${output}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done < "${filePath}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
@ -543,7 +543,7 @@ write_lepton_info() {
|
|||
fi
|
||||
for key in "Type" "Branch" "Ver" "Path"; do
|
||||
eval "local value=\${${key}}"
|
||||
output="${output}$(set_ini_value ${key} ${value})"
|
||||
output="${output}$(set_ini_value "${key}" "${value}")"
|
||||
done
|
||||
|
||||
# Latest element flushing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue