aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-04-03 15:39:48 +0000
committermerakor <cem@ckyln.com>2020-04-03 15:39:48 +0000
commit4aae8f18f769398efa632a005d6a4e0ae92cf3da (patch)
tree4a7e102a6607838509ed9cdc44943181c8d1ba92
parent62dd30fe56fa80772a14a7abcfd7acd5d9ed1d28 (diff)
downloadcpt-4aae8f18f769398efa632a005d6a4e0ae92cf3da.tar.gz
kiss: add repository submodule support
FossilOrigin-Name: 2085898c7ba60d5c551ff05ede976e3cdcdaf2fb5257dcce1e8ffcd7b29df086
-rwxr-xr-xkiss12
1 files changed, 10 insertions, 2 deletions
diff --git a/kiss b/kiss
index dc9915a..1e58bb7 100755
--- a/kiss
+++ b/kiss
@@ -1096,6 +1096,10 @@ pkg_fetch() {
if [ -w "$PWD" ] && [ "$uid" != 0 ]; then
git fetch
git merge
+ ! [ -e .gitmodules ] || {
+ git submodule init
+ git submodule update
+ }
else
[ "$uid" = 0 ] || log "$PWD" "Need root to update"
@@ -1113,9 +1117,13 @@ pkg_fetch() {
log "Dropping permissions to $user for pull"
case $su in
- su) "$su" -c "git fetch && git merge" "$user" ;;
+ su) "$su" -c "git fetch && git merge && { ! [ -e .gitmodules ] || { git submodule init ; git submodule update ;} ;}" "$user" ;;
*) "$su" -u "$user" git fetch
"$su" -u "$user" git merge
+ ! [ -e .gitmodules ] || {
+ "$su" -u "$user" git submodule init
+ "$su" -u "$user" git submodule update
+ }
esac
)
fi
@@ -1303,7 +1311,7 @@ args() {
l|list) pkg_list "$@" ;;
u|update) pkg_updates ;;
s|search) for pkg do pkg_find "$pkg" all; done ;;
- v|version) log kiss 1.10.1-carbs ;;
+ v|version) log kiss 1.11-carbs ;;
h|help|-h|--help|'')
log 'kiss [a|b|c|f|i|l|r|s|u|v] [pkg] [pkg] [pkg]'