瀏覽代碼

Ports: Add interactive mode to .port_include.sh

Running `./package.sh interactive` in a port directory will
spawn a new shell with the serenity build environment set up.
This makes porting software much easier as build commands can
be run interactively instead of having to modify package.sh
just to test things.
Noah Rosamilia 3 年之前
父節點
當前提交
860d142c8c
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      Ports/.port_include.sh

+ 5 - 1
Ports/.port_include.sh

@@ -547,8 +547,12 @@ parse_arguments() {
             shift
             shift
             parse_arguments $@
             parse_arguments $@
             ;;
             ;;
+        interactive)
+            export PS1="(serenity):\w$ "
+            bash --norc
+            ;;
         *)
         *)
-            >&2 echo "I don't understand $1! Supported arguments: fetch, patch, configure, build, install, installdepends, clean, clean_dist, clean_all, uninstall, showproperty."
+            >&2 echo "I don't understand $1! Supported arguments: fetch, patch, configure, build, install, installdepends, interactive, clean, clean_dist, clean_all, uninstall, showproperty."
             exit 1
             exit 1
             ;;
             ;;
     esac
     esac