1 |
yakumo_izuru |
1.1 |
#!/bin/sh |
2 |
|
|
if [ -e "$HOME/public_cvs" ]; then |
3 |
|
|
echo "$HOME/public_cvs already exists" |
4 |
|
|
exit 1 |
5 |
|
|
fi |
6 |
|
|
rm -rf $HOME/public_cvs |
7 |
|
|
mkdir -p $HOME/public_cvs/CVSROOT |
8 |
|
|
cvs -d $HOME/public_cvs init |
9 |
|
|
echo "anon:" > $HOME/public_cvs/CVSROOT/passwd |
10 |
|
|
echo -n "$USER:" >> $HOME/public_cvs/CVSROOT/passwd |
11 |
|
|
echo -n "Password for CVS: " |
12 |
|
|
%%PREFIX%%/bin/perl -MTerm::ReadKey -le 'Term::ReadKey::ReadMode("noecho");my $password = Term::ReadKey::ReadLine(0);Term::ReadKey::ReadMode("restore");$password =~ s/\R\z//;print $password;' | pwhash >> $HOME/public_cvs/CVSROOT/passwd |
13 |
|
|
echo |
14 |
|
|
echo "anon" > $HOME/public_cvs/CVSROOT/readers |
15 |
|
|
echo "$USER" > $HOME/public_cvs/CVSROOT/writers |
16 |
|
|
doas %%PREFIX%%/bin/modify-cvsroot-permission |
17 |
|
|
echo "Set CVSROOT to $HOME/public_cvs" |