diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index aac65135b7..29651d2f3f 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -68,6 +68,9 @@ shift : "${auth_type:=md5}" : "${auth_import_key:=}" : "${auth_opts:=}" +: "${launcher_name:=}" +: "${launcher_category:=}" +: "${launcher_command:=}" run_nocd() { echo "+ $@ (nocd)" @@ -77,9 +80,34 @@ run() { echo "+ $@" (cd "$workdir" && "$@") } -run_replace_in_file(){ +run_replace_in_file() { run perl -p -i -e "$1" $2 } +install_launcher() { + if [ -z "$launcher_name" ] || [ -z "${launcher_category}" ] || [ -z "${launcher_command}" ]; then + return + fi + script_name="${launcher_name,,}" + script_name="${script_name// /}" + mkdir -p $DESTDIR/usr/local/libexec + cat >$DESTDIR/usr/local/libexec/$script_name <