| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e23a0bd commit 5526479
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,17 +1,30 @@ | |||
| 1 | 1 | #!/bin/sh | |
| 2 | 2 | ||
| 3 | - # TODO: | ||
| 4 | - # check args for cfg file | ||
| 5 | 3 | if [ "x$1" = "x--remote" ]; then | |
| 6 | 4 | git_repo="$1 $2" | |
| 7 | 5 | shift 2 | |
| 8 | 6 | fi | |
| 7 | + | ||
| 8 | + pre_cmd_args="" | ||
| 9 | + # FIXME: robust processing of selected pre gitlab command args. | ||
| 10 | + for i in 1 2; do | ||
| 11 | + case $1 in | ||
| 12 | + -g|--gitlab|-c|--config-file) | ||
| 13 | + pre_cmd_args="$pre_cmd_args $1 $2" | ||
| 14 | + shift 2 | ||
| 15 | + ;; | ||
| 16 | + *) | ||
| 17 | + break | ||
| 18 | + ;; | ||
| 19 | + esac | ||
| 20 | + done | ||
| 21 | + | ||
| 9 | 22 | # last pipeline: | |
| 10 | 23 | pipeid=$(git gitlab $git_repo project-pipeline list | head -n 1 | cut -d: -f2) | |
| 11 | 24 | [ -n "$pipeid" ] || exit 0 | |
| 12 | - git gitlab $git_repo -o yaml -f id,status,web_url project-pipeline get --id $pipeid | ||
| 25 | + git gitlab $git_repo $pre_cmd_args -o yaml -f id,status,web_url project-pipeline get --id $pipeid | ||
| 13 | 26 | ||
| 14 | - git gitlab $git_repo -o yaml -f id,name,status,web_url project-pipeline-job list --pipeline-id $pipeid | ||
| 27 | + git gitlab $git_repo $pre_cmd_args -o yaml -f id,name,status,web_url project-pipeline-job list --pipeline-id $pipeid | ||
| 15 | 28 | ||
| 16 | 29 | #projurl=$(echo $url | sed "s#:\($proj\)#/\\1#") | |
| 17 | 30 | #projurl=$(echo $projurl | sed 's#git@#https://#') | |
| Back | FazBrowse Home | New Git URL |
0 commit comments