summaryrefslogtreecommitdiff
path: root/config/services/git/shell-commands/repo/src/set_privacy_command.sh
diff options
context:
space:
mode:
Diffstat (limited to 'config/services/git/shell-commands/repo/src/set_privacy_command.sh')
-rw-r--r--config/services/git/shell-commands/repo/src/set_privacy_command.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/config/services/git/shell-commands/repo/src/set_privacy_command.sh b/config/services/git/shell-commands/repo/src/set_privacy_command.sh
new file mode 100644
index 0000000..db033e6
--- /dev/null
+++ b/config/services/git/shell-commands/repo/src/set_privacy_command.sh
@@ -0,0 +1,17 @@
+path=$(realpath "${args[path]}")
+
+check-realpath "$path"
+
+case "${args[visibility]}" in
+ public)
+ mode="rX"
+ ;;
+ private)
+ mode=""
+ ;;
+esac
+
+chmod g="$mode" --recursive "$path"
+args[--tree]=1
+args[path]="$path"
+repo_show_command