Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐧 doc(shell script install) 📜 #16

Merged
merged 3 commits into from
Dec 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)