#!/bin/bash

if [ -z $1 ]
then
    echo Provide the new version number
else
    VERSION=$1

    # enter the repo's root directory
    REPO="$( dirname ${BASH_SOURCE[0]} )/../"
    cd $REPO

    sed -i'.original' -e "s#SW_VERSION = '.*'#SW_VERSION = '$VERSION'#" src/Toothpaste.php
fi
