From: Georgi Gerganov Date: Thu, 8 Jan 2026 11:40:23 +0000 (+0200) Subject: scripts : support chaining commands in pr2wt.sh (#18671) X-Git-Tag: upstream/0.0.7721~47 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=f2f6c88067e0da7cd1696fb6f78b0d1f5021262e;p=pkg%2Fggml%2Fsources%2Fllama.cpp scripts : support chaining commands in pr2wt.sh (#18671) --- diff --git a/scripts/pr2wt.sh b/scripts/pr2wt.sh index 36ccde2f..7970bec3 100755 --- a/scripts/pr2wt.sh +++ b/scripts/pr2wt.sh @@ -9,6 +9,7 @@ # sample usage: # ./scripts/pr2wt.sh 12345 # ./scripts/pr2wt.sh 12345 opencode +# ./scripts/pr2wt.sh 12345 "cmake -B build && cmake --build build" function usage() { echo "usage: $0 [cmd]" @@ -46,7 +47,7 @@ head_ref=$(echo "$meta" | jq -r '.head.ref') echo "url: $url_remote" echo "head_ref: $head_ref" -git remote rm pr/${PR} +git remote rm pr/${PR} 2> /dev/null git remote add pr/${PR} $url_remote git fetch pr/${PR} $head_ref @@ -62,5 +63,5 @@ echo "git worktree created in $wt_path" # if a command was provided, execute it if [[ $# -eq 2 ]]; then cd ../$dir-pr-$PR - exec $2 + eval "$2" fi