Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hecdelatorre/rar-extraction-script
https://github.com/hecdelatorre/rar-extraction-script
Last synced: about 19 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/hecdelatorre/rar-extraction-script
- Owner: hecdelatorre
- License: gpl-3.0
- Created: 2024-01-19T01:34:06.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-03-12T04:00:54.000Z (10 months ago)
- Last Synced: 2024-11-11T18:15:28.411Z (2 months ago)
- Language: Shell
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RAR Extraction Script
This bash script automates the extraction of RAR archives and their subsequent contents in a structured manner. It also includes instructions for installing the `rar` and `unrar` commands.
Make a synchronous version that decompresses one file at a time and an asynchronous version that decompresses several files at once.
## Prerequisites
Before using the script, ensure that the `rar` and `unrar` commands are installed on your system. Follow the steps below to install these commands:
### For Bash or Zsh Users:
```bash
curl -fsSL https://www.win-rar.com/fileadmin/winrar-versions/rarlinux-x64-624.tar.gz | sudo tar zxvf - -C /opt
echo 'export PATH=$PATH:/opt/rar' >> ~/.bashrc # For Bash users
# or
echo 'export PATH=$PATH:/opt/rar' >> ~/.zshrc # For Zsh users
```Note: Make sure to check [WinRAR's official website](https://www.win-rar.com/download.html) for the most recent version.
## Usage
1. Ensure the script has execute permissions:
```bash
chmod +x rar-extraction-synchronous.sh
```
or
```bash
chmod +x rar-extraction-asynchronous.sh
```2. Run the script either by cloning the repository and executing:
```bash
chmod +x rar-extraction-synchronous.sh
```
or
```bash
chmod +x rar-extraction-asynchronous.sh
```Or without cloning the repository using the following command:
```bash
bash -c "$(curl -fsSL https://codeberg.org/hecdelatorre/rar-extraction-script/raw/branch/main/rar-extraction-synchronous.sh)"
``````bash
bash -c "$(curl -fsSL https://codeberg.org/hecdelatorre/rar-extraction-script/raw/branch/main/rar-extraction-asynchronous.sh)"
```3. The script will prompt you for the directory where it will be executed.
4. It will then gather RAR files, create a "Contents" folder, extract RAR files into it, and finally unzip each RAR file in its respective folder.
## Important
- The script uses the `rar` and `unrar` commands, which may not be available in the default repositories.
- Choose the appropriate command for your shell (Bash or Zsh) and update the corresponding configuration file.Feel free to customize the script to suit your needs!
## License
This script is released under the [GPL v3 License](LICENSE).