#!/bin/bash USER_NAME=$(whoami) PUB_NAME="pub" BASE_PATH=`pwd | xargs dirname` PUB_BASE_PATH=$(pwd | xargs dirname | sed "s/\/home\/$USER_NAME\//\/home\/$PUB_NAME\//") MEDIA_DIRECTORY="media" PROJECT_PATH=`expr match "$BASE_PATH" '^\(\/[^\/]\+\/[^\/]\+\/[^\/]\+\/[^\/]\+\)'` # media start if [ -L "$BASE_PATH/$MEDIA_DIRECTORY" ] ; then unlink $BASE_PATH/$MEDIA_DIRECTORY fi if [ ! -d "$PUB_BASE_PATH/$MEDIA_DIRECTORY" ] ; then mkdir -p $PUB_BASE_PATH/$MEDIA_DIRECTORY echo 'Options -Indexes' > $PUB_BASE_PATH/$MEDIA_DIRECTORY/.htaccess fi if [ -d "$BASE_PATH/$MEDIA_DIRECTORY" ] ; then echo dir exists if [ "$(ls -A $BASE_PATH/$MEDIA_DIRECTORY)" ]; then mv $BASE_PATH/$MEDIA_DIRECTORY/* $PUB_BASE_PATH/$MEDIA_DIRECTORY chmod -R 775 $PUB_BASE_PATH/$MEDIA_DIRECTORY fi rm -Rf $BASE_PATH/$MEDIA_DIRECTORY fi ln -sT $PUB_BASE_PATH/$MEDIA_DIRECTORY $BASE_PATH/$MEDIA_DIRECTORY #echo Public link on $MEDIA_DIRECTORY created "$BASE_PATH/$MEDIA_DIRECTORY" # media end #------------------------------- set ignores ----------------------------- svn propset svn:ignore ".buildpath .cache .metadata .project .settings nbproject sitemap staging var" ./../ svn propset svn:ignore ".actionScriptProperties .flexProperties .project .settings" ./../lib/flex/uploader svn propset svn:ignore ".actionScriptProperties .flexLibProperties .project .settings " ./../lib/flex/varien svn propset svn:ignore 'config_sandbox' ./../app svn propset svn:ignore "local.xml use_cache.ser " ./../app/etc #-------------------------------------- set ignores end -------------------------