Add submodules to the superrepo if a package has never been built
[invirt/packages/invirt-dev.git] / invirt-configure-git-hooks
index bed41b5..d84c1d3 100755 (executable)
@@ -4,7 +4,7 @@ set -e
 set -u
 
 link_to() {
-    rm -rf "$1"
+    rm -r "$1"
     ln -s "$2" "$1"
 }
 
@@ -15,7 +15,7 @@ link_to "$package_base/packages.git/hooks" "$hook_base/super"
 
 for pkg in "$package_base"/*/*.git; do
     case "$pkg" in
-       "$package_base/packages/*.git") link_to "$pkg/hooks" "$hook_base/sub" ;;
+       "$package_base"/packages/*.git) link_to "$pkg/hooks" "$hook_base/sub" ;;
        *) link_to "$pkg/hooks" "$hook_base/other" ;;
     esac
 done