2021-08-24 18:45:25 +00:00
|
|
|
edit:add-var commitkcp~ [@argv]{
|
|
|
|
use str
|
2021-08-27 19:45:39 +00:00
|
|
|
var m = [
|
2021-08-24 18:45:25 +00:00
|
|
|
&name=
|
|
|
|
&ver=
|
|
|
|
]
|
|
|
|
|
|
|
|
keys $m | each [k]{
|
2021-08-27 19:45:39 +00:00
|
|
|
var p = 'pkg'$k'='
|
2021-08-24 18:45:25 +00:00
|
|
|
m[$k] = (str:trim-prefix (cat PKGBUILD | grep $p | take 1) $p)
|
|
|
|
}
|
|
|
|
|
2021-08-27 19:45:39 +00:00
|
|
|
var msg = $m[name]' '$m[ver]
|
2021-08-24 18:45:25 +00:00
|
|
|
if (> (count $argv) 0) {
|
|
|
|
msg = $msg' - '(str:join ' ' $argv)
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "git commit -am '"$msg"' ; git push"
|
|
|
|
git commit -am $msg; git push
|
|
|
|
}
|