commit b7d3908c80c7fba496487743e98f9e73004b8fe0
parent fc05e12e59f41274f14145b23031e13ca955fc78
Author: ccx <root@dorje.wpr.cz>
Date: Mon, 29 Mar 2021 18:27:55 +0200
Correct error handling for install_submodule.
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/install b/install
@@ -61,6 +61,7 @@ install_dot() {
local submodule cmd
# export sm_dst_* variables for each submodule
for submodule in "${(k@)sm_dst}"; do
+ [[ $submodule == . ]] && continue
eval "export sm_dst_${submodule//-/_}"='$sm_dst[$submodule]'
done
@@ -81,9 +82,12 @@ install_submodule() {
case $submodule in
(package) install_package;;
(s6-rc) install_unpack;;
- (init-maker) install_unpack;;
+ (init) install_unpack;;
(.) install_dot;;
- (*) echo >&2 "unhandled submodule: ${(qqq)submodule}";;
+ (*)
+ echo >&2 "unhandled submodule: ${(qqq)submodule}"
+ exit 1
+ ;;
esac
}