diff --git a/README.md b/README.md index 5b4381a..9504b9f 100644 --- a/README.md +++ b/README.md @@ -24,21 +24,19 @@ sudo yum install optipng jpegoptim libwebp-tools -y ### Installation -1) Download the script and make it executable +1) Download the script ```bash -wget -O $HOME/optimize.sh https://raw.githubusercontent.com/VirtuBox/wp-optimize/master/optimize.sh -chmod +x $HOME/optimize.sh +git clone https://github.com/VirtuBox/img-optimize.git $HOME/.img-optimize ``` 2) Add an alias in your bashrc ```bash -echo "alias img-optimize=$HOME/optimize.sh" >> $HOME/.bashrc +echo "alias img-optimize=$HOME/.img-optimize/optimize.sh" >> $HOME/.bashrc source $HOME/.bashrc ``` - ### Usage ```bash @@ -57,6 +55,16 @@ Examples: ``` +### Update the script + +To update the script, just run : + +```bash +git -C $HOME/.img-optimize pull + +source .bashrc +``` + ### Warning Conversion process can take a while, you can use `tmux` to launch the script and be able to close your ssh connection without interrupting conversion. Then just use `tmux attach` to login back in your tmux session. diff --git a/docs/README.md b/docs/README.md index 5b4381a..9504b9f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -24,21 +24,19 @@ sudo yum install optipng jpegoptim libwebp-tools -y ### Installation -1) Download the script and make it executable +1) Download the script ```bash -wget -O $HOME/optimize.sh https://raw.githubusercontent.com/VirtuBox/wp-optimize/master/optimize.sh -chmod +x $HOME/optimize.sh +git clone https://github.com/VirtuBox/img-optimize.git $HOME/.img-optimize ``` 2) Add an alias in your bashrc ```bash -echo "alias img-optimize=$HOME/optimize.sh" >> $HOME/.bashrc +echo "alias img-optimize=$HOME/.img-optimize/optimize.sh" >> $HOME/.bashrc source $HOME/.bashrc ``` - ### Usage ```bash @@ -57,6 +55,16 @@ Examples: ``` +### Update the script + +To update the script, just run : + +```bash +git -C $HOME/.img-optimize pull + +source .bashrc +``` + ### Warning Conversion process can take a while, you can use `tmux` to launch the script and be able to close your ssh connection without interrupting conversion. Then just use `tmux attach` to login back in your tmux session.