Commit: eac1628b05418476fa57b193a0c958e0e08fc34f
Parent: eed9ccd304fcfaacf9ff87e9061830cf4b6f872b
Author: Randy Palamar
Date: Sun, 24 Sep 2023 15:43:22 -0600
add git-sortmodules script and sort
Diffstat:
2 files changed, 43 insertions(+), 31 deletions(-)
diff --git a/.gitmodules b/.gitmodules
@@ -1,46 +1,46 @@
-[submodule "src/c/links"]
- path = src/c/links
- url = git@git.rnpnr.xyz:links.git
-[submodule "src/c/dir2list"]
- path = src/c/dir2list
- url = git@git.rnpnr.xyz:dir2list.git
-[submodule "src/c/status"]
- path = src/c/status
- url = git@git.rnpnr.xyz:status.git
-[submodule "src/c/doas"]
- path = src/c/doas
- url = git@git.rnpnr.xyz:doas.git
[submodule ".config/mpv/scripts/mpv-reload"]
path = .config/mpv/scripts/mpv-reload
url = https://github.com/4e6/mpv-reload.git
+[submodule ".config/mpv/scripts/mpv-toolbox"]
+ path = .config/mpv/scripts/mpv-toolbox
+ url = https://codeberg.org/NRK/mpv-toolbox.git
[submodule ".config/mpv/scripts/mpv2oboeru"]
path = .config/mpv/scripts/mpv2oboeru
url = git@git.rnpnr.xyz:mpv2oboeru.git
-[submodule "src/c/dwm"]
- path = src/c/dwm
- url = git@git.rnpnr.xyz:dwm.git
- branch = rnpnr
-[submodule ".config/vis/plugins/vis-spellcheck"]
- path = .config/vis/plugins/vis-spellcheck
- url = https://github.com/fischerling/vis-spellcheck.git
[submodule ".config/mpv/scripts/videoclip"]
path = .config/mpv/scripts/videoclip
url = https://github.com/Ajatt-Tools/videoclip.git
-[submodule "src/sh/omoidasu"]
- path = src/sh/omoidasu
- url = git@git.rnpnr.xyz:omoidasu.git
-[submodule "src/c/oboeru"]
- path = src/c/oboeru
- url = git@git.rnpnr.xyz:oboeru.git
-[submodule "src/c/jdict"]
- path = src/c/jdict
- url = git@git.rnpnr.xyz:jdict.git
-[submodule ".config/mpv/scripts/mpv-toolbox"]
- path = .config/mpv/scripts/mpv-toolbox
- url = https://codeberg.org/NRK/mpv-toolbox.git
[submodule ".config/vis/plugins/vis-gpg"]
path = .config/vis/plugins/vis-gpg
url = git@git.rnpnr.xyz:vis-gpg.git
[submodule ".config/vis/plugins/vis-lint"]
path = .config/vis/plugins/vis-lint
url = git@git.rnpnr.xyz:vis-lint.git
+[submodule ".config/vis/plugins/vis-spellcheck"]
+ path = .config/vis/plugins/vis-spellcheck
+ url = https://github.com/fischerling/vis-spellcheck.git
+[submodule "src/c/dir2list"]
+ path = src/c/dir2list
+ url = git@git.rnpnr.xyz:dir2list.git
+[submodule "src/c/doas"]
+ path = src/c/doas
+ url = git@git.rnpnr.xyz:doas.git
+[submodule "src/c/dwm"]
+ path = src/c/dwm
+ url = git@git.rnpnr.xyz:dwm.git
+ branch = rnpnr
+[submodule "src/c/jdict"]
+ path = src/c/jdict
+ url = git@git.rnpnr.xyz:jdict.git
+[submodule "src/c/links"]
+ path = src/c/links
+ url = git@git.rnpnr.xyz:links.git
+[submodule "src/c/oboeru"]
+ path = src/c/oboeru
+ url = git@git.rnpnr.xyz:oboeru.git
+[submodule "src/c/status"]
+ path = src/c/status
+ url = git@git.rnpnr.xyz:status.git
+[submodule "src/sh/omoidasu"]
+ path = src/sh/omoidasu
+ url = git@git.rnpnr.xyz:omoidasu.git
diff --git a/bin/git-sortmodules b/bin/git-sortmodules
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+awk 'BEGIN { I=0 ; J=0 ; K="" }
+ /^\[submodule/{ N+=1 ; J=1 ; K=$2 ; gsub(/("vendor\/|["\]])/, "", K) }
+ { print K, N, J, $0 } ; { J+=1 }' \
+ .gitmodules \
+ | sort \
+ | awk '{ $1="" ; $2="" ; $3="" ; print }' \
+ | sed 's/^ *//g' \
+ | awk '/^\[/{ print ; next } { print "\t" $0 }' \
+ > .gitmodules.new && mv .gitmodules.new .gitmodules
+