update installation method

This commit is contained in:
VirtuBox 2018-10-29 19:26:16 +01:00
parent ca465cd743
commit b1b012ab10
2 changed files with 26 additions and 10 deletions

View File

@ -24,21 +24,19 @@ sudo yum install optipng jpegoptim libwebp-tools -y
### Installation ### Installation
1) Download the script and make it executable 1) Download the script
```bash ```bash
wget -O $HOME/optimize.sh https://raw.githubusercontent.com/VirtuBox/wp-optimize/master/optimize.sh git clone https://github.com/VirtuBox/img-optimize.git $HOME/.img-optimize
chmod +x $HOME/optimize.sh
``` ```
2) Add an alias in your bashrc 2) Add an alias in your bashrc
```bash ```bash
echo "alias img-optimize=$HOME/optimize.sh" >> $HOME/.bashrc echo "alias img-optimize=$HOME/.img-optimize/optimize.sh" >> $HOME/.bashrc
source $HOME/.bashrc source $HOME/.bashrc
``` ```
### Usage ### Usage
```bash ```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 ### 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. 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.

View File

@ -24,21 +24,19 @@ sudo yum install optipng jpegoptim libwebp-tools -y
### Installation ### Installation
1) Download the script and make it executable 1) Download the script
```bash ```bash
wget -O $HOME/optimize.sh https://raw.githubusercontent.com/VirtuBox/wp-optimize/master/optimize.sh git clone https://github.com/VirtuBox/img-optimize.git $HOME/.img-optimize
chmod +x $HOME/optimize.sh
``` ```
2) Add an alias in your bashrc 2) Add an alias in your bashrc
```bash ```bash
echo "alias img-optimize=$HOME/optimize.sh" >> $HOME/.bashrc echo "alias img-optimize=$HOME/.img-optimize/optimize.sh" >> $HOME/.bashrc
source $HOME/.bashrc source $HOME/.bashrc
``` ```
### Usage ### Usage
```bash ```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 ### 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. 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.