Skip to content

Commit

Permalink
Merge pull request #16 from opt-nc/shell-script-install
Browse files Browse the repository at this point in the history
🐧  doc(shell script install) 📜
  • Loading branch information
Dougniel authored Dec 21, 2022
2 parents ab33de8 + 98a843e commit dec4de1
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 1 deletion.
56 changes: 56 additions & 0 deletions INSTALL_DEBIAN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# 🤓 Linux shell install script

Below are resources to help install `j7zip` on any debian based 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
```

5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ java -jar j7zip.jar -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 dec4de1

Please sign in to comment.