# Make a directory for elgg data files outside the root
mkdir elgg_data &> /dev/null

 

#Do patches
patch -p0 -s -N  -r tmp.rej                   	< patches/relationship_get_set_public.diff > /dev/null
patch -p0 -s -N -d elgg -r tmp.rej            	< patches/lowercase_post.diff              > /dev/null
patch -p0 -s -N -d elgg/actions/user -r tmp.rej < patches/strip_tags_name_field.diff	   > /dev/null
patch -p0 -s -N -d elgg/mod/groups -r tmp.rej 	< patches/add_closing_labels.diff          > /dev/null
patch -p0 -s -N -d elgg/mod/profile -r tmp.rej 	< patches/check_page_owner_exists.diff     > /dev/null
rm tmp.rej &> /dev/null

echo 'Setup successful'