From 4aae8f18f769398efa632a005d6a4e0ae92cf3da Mon Sep 17 00:00:00 2001 From: merakor Date: Fri, 3 Apr 2020 15:39:48 +0000 Subject: kiss: add repository submodule support FossilOrigin-Name: 2085898c7ba60d5c551ff05ede976e3cdcdaf2fb5257dcce1e8ffcd7b29df086 --- kiss | 12 ++++++++++-- 1 file 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]' -- cgit v1.2.3