<commit_before>curpath=`pwd`
if ! [[ $curpath =~ .*/content/themes.* ]]
then
   echo "Install path is not valid."
   echo "Move to you themes directory (e.g. 
/path/to/ghost/content/themes)"
   exit 1
fi
version=0
if [ -z "$1" ]; then version="master"; else version=$1; fi


echo $version

echo "Installation started..."
echo "Removing any previous Optimium installs..."
rm -rf Optimium
echo "Downloading Optimium from GitHub..."
wget -q https://github.com/viruzx/Optimium/archive/"$version".zip
echo "Extracting Archive..."
unzip -q "$version".zip
rm "$version".zip
mv Optimium-"$version" Optimium
echo "Attemping to restart Ghost..."
echo "As a service.."
service ghost restart 2>/dev/null
echo "As a forever script.."
cd ../..
forever stop index.js 2>/dev/null
forever start index.js 2>/dev/null
cd content/themes/
echo "Using SuperVisor.."
supervisorctl stop ghost 2>/dev/null
supervisorctl start ghost 2>/dev/null
echo "Creating update script"
cp Optimium/install.sh optimium.sh
echo "Done!"
echo "You may need to now restart Ghost to have it as an option."
echo "Run this script occasionally to make sure you have the latest build."
echo "To update theme just run optimium.sh in this directory."<commit_msg>Installer no longer attempts to restart ghost. This should have been manual.<commit_after>curpath=`pwd`
if ! [[ $curpath =~ .*/content/themes.* ]]
then
   echo "Install path is not valid."
   echo "Move to you themes directory (e.g. 
/path/to/ghost/content/themes)"
   exit 1
fi
version=0
if [ -z "$1" ]; then version="master"; else version=$1; fi


echo $version

echo "Installation started..."
echo "Removing any previous Optimium installs..."
rm -rf Optimium
echo "Downloading Optimium from GitHub..."
wget -q https://github.com/viruzx/Optimium/archive/"$version".zip
echo "Extracting Archive..."
unzip -q "$version".zip
rm "$version".zip
mv Optimium-"$version" Optimium
echo "Creating update script"
cp Optimium/install.sh optimium.sh
echo "Done!"
echo "You need to now restart Ghost to have it as an option."
echo "Run this script occasionally to make sure you have the latest build."
echo "To update theme just run optimium.sh in this directory."
{'fraction_non_alphanumeric': 0.12609699769053118, 'fraction_numerical': 0.006004618937644342, 'mean_word_length': 4.037209302325581, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1483312', 'n_tokens_mistral': 683, 'n_tokens_neox': 654, 'n_words': 269}