Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PortWINE
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mikhail Tergoev
PortWINE
Commits
9e785d61
Unverified
Commit
9e785d61
authored
Feb 28, 2026
by
Boris Yumankulov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(--show-ppdb): account for var and user.conf variables
Signed-off-by:
Boris Yumankulov
<
boria138@altlinux.org
>
parent
ea6cdcb9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
10 deletions
+29
-10
start.sh
data_from_portwine/scripts/start.sh
+29
-10
No files found.
data_from_portwine/scripts/start.sh
View file @
9e785d61
...
...
@@ -547,18 +547,37 @@ ${translations[Usage examples:]}
pw_init_db
fi
grep
-E
'^export '
"
$ppdb_path
"
\
|
sed
'/^[[:space:]]*$/d'
\
|
while
IFS
=
read
-r
line
;
do
line
=
"
${
line
#export
}
"
if
[[
"
$line
"
=
~ ^
([
^
=]
+
)=
\"
([
^
\"
]
*
)
\"
[[
:space:]]
*
#.*$ ]]; then
echo
"
${
BASH_REMATCH
[1]
}
=
\"
${
BASH_REMATCH
[2]
}
\"
"
elif
[[
"
$line
"
=
~ ^
([
^
=]
+
)=([
^#[:space:]]+
)[[
:space:]]
*
#.*$ ]]; then
echo
"
${
BASH_REMATCH
[1]
}
=
${
BASH_REMATCH
[2]
}
"
else
echo
"
$line
"
declare
-A
all_vars
while
IFS
=
'='
read
-r
key val
;
do
key
=
"
${
key
#export
}
"
val
=
"
${
val
#\
"}"
val=
"
${
val
%\
"}"
all_vars[
"
$key
"
]=
"
$val
"
done < <(grep -E
'^export '
"
$ppdb_path
"
| sed
'/^[[:space:]]*$/d'
)
check_user_conf
if [[ -f
"
$USER_CONF
"
]]; then
while IFS=
'='
read -r key val; do
key=
"
${
key
#export
}
"
val=
"
${
val
#\
"}"
val=
"
${
val
%\
"}"
all_vars[
"
$key
"
]=
"
$val
"
done < <(grep -E
'^export '
"
$USER_CONF
"
2>/dev/null | sed
'/^[[:space:]]*$/d'
)
fi
while IFS=
'='
read -r key val; do
key=
"
${
key
#export
}
"
val=
"
${
val
#\
"}"
val=
"
${
val
%\
"}"
if [[ -z
"
${
all_vars
[
$key
]+x
}
"
]]; then
all_vars[
"
$key
"
]=
"
$val
"
fi
done < <(grep -E
'^export '
"
$PORT_SCRIPTS_PATH
/var"
| sed
'/^[[:space:]]*$/d'
)
for key in
"
${
!all_vars[@]
}
"
; do
echo
"
${
key
}
=
\"
${
all_vars
[
$key
]
}
\"
"
done
exit 0
;;
--backup-prefix)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment