Skip to content

Instantly share code, notes, and snippets.

@ha1t
Created April 20, 2012 09:51
Show Gist options
  • Save ha1t/2427412 to your computer and use it in GitHub Desktop.
Save ha1t/2427412 to your computer and use it in GitHub Desktop.
Subversionリポジトリ作るやつ。もうSubversionとか使ってない…
#!/bin/sh
if [ -z $1 ]; then
echo "Usage:$0 [project_name]"
exit
fi
base_dir="/var/lib/svn"
target_dir=$base_dir/$1
sudo svnadmin create --fs-type=fsfs $target_dir
if [ ! -d $target_dir ]; then
echo "$target_dir not found"
exit
fi
sudo chmod -R 777 $target_dir/db
sudo chmod -R 777 $target_dir/dav
svn co file://$target_dir /tmp/buf_svn
svn mkdir /tmp/buf_svn/trunk /tmp/buf_svn/tags /tmp/buf_svn/branches
cd /tmp/buf_svn
svn ci -m "build base"
rm -rf /tmp/buf_svn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment