aboutsummaryrefslogtreecommitdiff
path: root/services/git-add-user
blob: 2e500d2d9cef4bd0a454c4152b0ea7dea80b2421 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#! /usr/bin/bash

set -e

script_dir="$(dirname "$0")"
. "$script_dir/common.bash"

ps_dir="$CRUPEST_PROJECT_DIR/$CRUPEST_DATA_DIR/git/private"
ps_file="$ps_dir/user-info"
echo "Password file at $ps_file"
[[ -d "$ps_dir" ]] || mkdir -p "$ps_dir"
[[ -f "$ps_file" ]] || touch "$ps_file"

exec docker run -it --rm -v "$ps_file:/user-info" httpd htpasswd "/user-info" "$1"