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