Saturday, August 23, 2014

Script: create new SVN project, create branches and trunk folders, set permissions

Script for automatically creating a new SVN project, branches / trunk folders and setting file permissions.

Usage: $ ./ svn-project-name

File ( contents:



if [ -d "$dirRepo" ]; then
        echo "ERROR: Directory already exists: $dirRepo"

echo "Creating repository folder"
svnadmin create $dirRepo

echo "Checking out, creating trunk/branches folders and first commit"
if [ -d "$dirCheckoutTmp" ]; then
        echo "Deleting directory $dirCheckoutTmp"
        rm -rf $dirCheckoutTmp
svn co file://$dirRepo $dirCheckoutTmp
cd $dirCheckoutTmp
mkdir trunk
mkdir branches
mkdir tags
svn add *
svn ci -m "init deploy" *
rm -rf $dirCheckoutTmp

echo "Setting additional permissions"
chown -R user:group $dirRepo

Friday, August 22, 2014

Ubuntu 14.04 add custom launcher to menu

Ubuntu 14.04 create custom launcher prerequisites:

$ sudo apt-get install gnome-panel --no-install-recommends

Create executable file for easy reuse

$ cd ~
$ touch
$ chmod +x

Edit the file and set contents:

sudo gnome-desktop-item-edit /usr/share/applications/ --create-new

Anytime you want to create a new launcher, run:

$ ~/

After creating the launcher, it will show up in Unity's search result.