Closed stefanuswjy closed 8 years ago
Sorry about this @stefanuswjy, it appears the manual installation instructions are not correct.
Please try the following;
# create a folder at ~/imageoptim-cli and browse to it
mkdir "${HOME}/imageoptim-cli" && cd "$_"
# download and extract that zip in our new folder
curl --output imageoptim-cli.zip https://codeload.github.com/JamieMason/ImageOptim-CLI/zip/1.14.8
unzip imageoptim-cli.zip
# move the files from our version folder up into ~/imageoptim-cli
mv ImageOptim-CLI-1.14.8/* .
# add this new folder to where terminal looks for programs to run
export PATH=$PATH:"$PWD/bin"
Hi @JamieMason , is it correct that the folder should arranged like this?
and, what the 4th step mean? i still dont get it :( # add this new folder to where terminal looks for programs to run export PATH=$PATH:"$PWD/bin"
I think you might have run some of the commands from the wrong location – the commands we're running are relative to the current folder your terminal is in at the time.
Delete that imageoptim-cli folder and let's try it with absolute paths;
# create a folder at ~/imageoptim-cli
mkdir "${HOME}/imageoptim-cli"
# browse to it
cd "${HOME}/imageoptim-cli"
# download imageoptim-cli into it
curl --output "${HOME}/imageoptim-cli/imageoptim-cli.zip" https://codeload.github.com/JamieMason/ImageOptim-CLI/zip/1.14.8
# unzip package
unzip "${HOME}/imageoptim-cli/imageoptim-cli.zip"
# move the files from our version folder up into ~/imageoptim-cli
mv "${HOME}/imageoptim-cli/ImageOptim-CLI-1.14.8/*" "${HOME}/imageoptim-cli"
can you run echo $PATH
and show me what it says please?
it says:
Open up ~/.bash_profile
and add somewhere in that file;
# Add imageoptim-cli to the $PATH
export PATH="$PATH:$HOME/imageoptim-cli/bin"
Then restart your Terminal.
If it worked, if you run imageoptim -v
it should show the version 1.14.8.
Please let me know if this worked so I can close the issue or give you more help @stefanuswjy.
Hi @JamieMason , i'm stuck on move the files from our version folder up into ~/imageoptim-cli
it says No such file or directory and also when i open up ~/.bash_profile
, it says No such file or directory too. sorry for late reply :(
I think the simplest thing would be to download https://nodejs.org 6.3.0 and then run npm install -g imageoptim-cli
in your Terminal.
This avoids the technical aspects of going the manual route.
yeahhh, it worked !!! Thankyou @JamieMason :)
btw, does the imageoptim-cli has expired date? or i can use it continuously?
great 😄
btw, does the imageoptim-cli has expired date? or i can use it continuously?
No expiry or anything. If a new version of imageoptim-cli is released and you want to update your copy, you can just run npm install -g imageoptim-cli
again to get the new version.
Thanks a lot @JamieMason . This imageoptim-cli would be my lifesaver :)
great to hear, thanks @stefanuswjy.
Basically, I'm a designer with a limited understanding of coding. I've follow your instructions about manual installation and usage. But, it didn't work. The terminal says the
-bash: imageoptim: command not found
This would be a lifesaver for me if it works. But, I'm facing a huge knowledge barrier :( ps: sorry for my bad english