Created
November 3, 2011 02:58
Revisions
-
jaceju revised this gist
Nov 3, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ # History: # 2011/11/03 Jace Ju First release # Usage: # Create template of project at first time: # > cd /path/to/project_template # > mkdir branches # > mkdir tags -
jaceju revised this gist
Nov 3, 2011 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,8 +4,14 @@ # History: # 2011/11/03 Jace Ju First release # Usage: # Create template for project: # > cd /path/to/project_template # > mkdir branches # > mkdir tags # > zf create project trunk # # Build repository: # > ./create_zf_project.sh project_name # PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH -
jaceju revised this gist
Nov 3, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ # Program: # 利用專案樣版在 Subversion 中建立一個 Zend Framework 專案 # History: # 2011/11/03 Jace Ju First release # Usage: # zf create project /path/to/project_template # ./create_zf_project.sh project_name -
jaceju revised this gist
Nov 3, 2011 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,12 @@ #!/bin/bash # Program: # 利用專案樣版在 Subversion 中建立一個 Zend Framework 專案 # History: # 2011/11/01 Jace Ju First release # Usage: # zf create project /path/to/project_template # ./create_zf_project.sh project_name # PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH -
jaceju created this gist
Nov 3, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,69 @@ #!/bin/bash # Program: # Create Web Project # History: # 2011/11/01 Jace Ju First release PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH ## Set variables repo_path="/path/to/repos" project_name="$1" temp_path="__template__.$RANDOM.$RANDOM.$RANDOM.$$" svn_local_url="file://$repo_path" svn_http_url="http://domain/svn" template_path="/path/to/project_template" user="_www" group="_www" zf_lib="http://framework.zend.com/svn/framework/standard/tags/release-1.11.10/library/Zend" ## Get name of project until [ "$project_name" != "" ] do read -p "Please input Project Name: " project_name done ## Exit if project exists if test -r "$repo_path/$project_name" ; then echo "Project $project_name exists." exit 1 fi ## Create repository echo "Creating repository..." cd $repo_path svnadmin create $project_name > /dev/null ## Create structure of project echo "Creating structure of project..." cd $TMPDIR mkdir $temp_path > /dev/null cd $temp_path cp -R "$template_path/" $project_name > /dev/null ## Import project echo "Importing project..." svn import $project_name "$svn_local_url/$project_name" -m "Initialize structure of project." > /dev/null # Checkout project rm -rf $project_name svn checkout "$svn_local_url/$project_name/trunk" $project_name > /dev/null # Set externals svn propset svn:externals "$zf_lib Zend" "$project_name/library" > /dev/null svn commit $project_name -m "Set properties" > /dev/null # Changing permission echo "Changing permissions of repository..." sudo chown -R "$user" "$repo_path/$project_name" > /dev/null sudo chgrp -R "$group" "$repo_path/$project_name" > /dev/null ## Clear off temp file echo "Clearing off temp file..." cd $TMPDIR rm -rf $temp_path > /dev/null echo "done." echo "The final svn url is '$svn_http_url/$project_name/trunk'" exit 0