21 lines
391 B
Plaintext
21 lines
391 B
Plaintext
edit:add-var commitkcp~ [@argv]{
|
|
use str
|
|
var m = [
|
|
&name=
|
|
&ver=
|
|
]
|
|
|
|
keys $m | each [k]{
|
|
var p = 'pkg'$k'='
|
|
set m[$k] = (str:trim-prefix (cat PKGBUILD | grep $p | take 1) $p)
|
|
}
|
|
|
|
var msg = $m[name]' '$m[ver]
|
|
if (> (count $argv) 0) {
|
|
set msg = $msg' - '(str:join ' ' $argv)
|
|
}
|
|
|
|
echo "git commit -am '"$msg"' ; git push"
|
|
git commit -am $msg; git push
|
|
}
|