Skip to content

Commit

Permalink
doc(shell script install)
Browse files Browse the repository at this point in the history
- #2
- #14
- #2
  • Loading branch information
adriens authored Dec 21, 2022
1 parent 31b4940 commit 266e472
Showing 1 changed file with 60 additions and 1 deletion.
61 changes: 60 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,65 @@ After downloading, get the lastest help usage typing :
java -jar j7zip.jar -h
```

# 🤓 Linux shell install script

Below are resources to help install `j7zip` on any Linux distro.

## ☕ Java runtime (`sdkman!` install)

Java 8 is a prerequisite, here is the script to install it properly:

```
sudo apt-get install zip
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install java 8.0.302-open
java -version
clear
```


## 📜 Shell Install script


```
# Set up the target version
export J7ZIP_VERSION=v1.0.0
# !!! DO NOT CHANGE ANYTHING BELOW THIS LINE !!!
curl -LO https://github.com/opt-nc/j7zip/releases/download/$J7ZIP_VERSION/j7zip.jar
file j7zip.jar
sudo mkdir /opt/j7zip
sudo cp j7zip.jar /opt/j7zip/j7zip.jar
cat <<EOF >j7zip.sh
#!/bin/sh
java -jar /opt/j7zip/j7zip.jar "\$@"
EOF
sudo cp j7zip.sh /opt/j7zip
sudo chmod +x /opt/j7zip/j7zip.sh
sudo ln -s /opt/j7zip/j7zip.sh /usr/bin/j7zip
# clean up the mess
rm j7zip*
clear
```


## 🚀 Ready to Use `j7zip`

```
# Get the current version
j7zip -V
# Get some help
j7zip -h
```

# 🙏 Credits

This tool is based on [Apache commons-compress](https://commons.apache.org/proper/commons-compress/) and [xz](https://tukaani.org/xz/java.html)
This tool is based on:

- [Apache commons-compress](https://commons.apache.org/proper/commons-compress/)
- [xz](https://tukaani.org/xz/java.html)

0 comments on commit 266e472

Please sign in to comment.