mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 04:46:43 +00:00
18 lines
223 B
Bash
18 lines
223 B
Bash
|
#! @shell@
|
||
|
|
||
|
declare -a args=()
|
||
|
|
||
|
token=$1
|
||
|
shift
|
||
|
|
||
|
while (( $# )); do
|
||
|
if [[ "$1" = "$token" ]]; then
|
||
|
mapfile -t -O $(("${#args[@]}" + 1)) args
|
||
|
else
|
||
|
args+=("$1")
|
||
|
fi
|
||
|
shift
|
||
|
done
|
||
|
|
||
|
exec "${args[@]}"
|