Skip to content

Instantly share code, notes, and snippets.

@voronkovich
Last active August 29, 2015 14:05
Show Gist options
  • Save voronkovich/da12501c5298fb09acda to your computer and use it in GitHub Desktop.
Save voronkovich/da12501c5298fb09acda to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
#
# Launch this script in a new Joomla folder
#
current_dir=$(readlink -f .)
if [[ ! -w $current_dir/configuration.php ]]; then
echo "Error: configuration.php isn't writable or doesn't exists" 1>&2
exit 1;
fi
sed -i -e "s|\(.*\$log_path.*\)=.*|\1 = '$current_dir/logs/';|" $current_dir/configuration.php
sed -i -e "s|\(.*\$tmp_path.*\)=.*|\1 = '$current_dir/tmp/';|" $current_dir/configuration.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment