Skip to content

Commit

Permalink
Ports: Set defaults before loading package.sh
Browse files Browse the repository at this point in the history
This is too much bash magic for a simple "Use this value if the script
doesn't set anything", especially since only one default setting depends
on values from the script.
  • Loading branch information
timschumi authored and awesomekling committed Oct 5, 2021
1 parent 52e9f25 commit e507cfc
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions Ports/.port_include.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,26 @@ host_env() {

packagesdb="${DESTDIR}/usr/Ports/packages.db"

makeopts=-j$(nproc)
installopts=
configscript=configure
configopts=
useconfigure=false
depends=
patchlevel=1
auth_type=
auth_import_key=
auth_opts=
launcher_name=
launcher_category=
launcher_command=
launcher_run_in_terminal=false
icon_file=

. "$@"
shift

: "${makeopts:=-j$(nproc)}"
: "${installopts:=}"
: "${workdir:=$port-$version}"
: "${configscript:=configure}"
: "${configopts:=}"
: "${useconfigure:=false}"
: "${depends:=}"
: "${patchlevel:=1}"
: "${auth_type:=}"
: "${auth_import_key:=}"
: "${auth_opts:=}"
: "${launcher_name:=}"
: "${launcher_category:=}"
: "${launcher_command:=}"
: "${launcher_run_in_terminal:=false}"
: "${icon_file:=}"

run_nocd() {
echo "+ $@ (nocd)"
Expand Down

0 comments on commit e507cfc

Please sign in to comment.