gitservconf/git-shell-commands/configure
2024-08-12 16:26:09 +02:00

13 lines
290 B
Bash
Executable file

#!/bin/bash
if [ "$#" -ne 3 ]; then
echo "Usage: configure <path_to_repository> <config_key> <config_value>"
exit 1
fi
echo "Enter description: "
read INPUT
REPO_PATH="/srv/git/$1"
cd "$REPO_PATH" && git config --local "$2" "$3"
echo "Wrote '$INPUT' into $REPO_PATH/description"