Skip to content

Commit f1b373a

Browse files
committed
update project
1 parent 12d4f23 commit f1b373a

File tree

5 files changed

+157
-173
lines changed

5 files changed

+157
-173
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
toolchain: nightly
2929
override: true
3030
components: clippy
31-
- run: cargo clippy -- -D warnings
31+
- run: cargo clippy --all-targets --all-features -- -D warnings
3232

3333
tests-1:
3434
strategy:

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "xcompress"
3-
version = "0.11.6"
3+
version = "0.11.7"
44
authors = ["Magic Len <[email protected]>"]
5-
edition = "2018"
5+
edition = "2021"
66
repository = "https://github.com/magiclen/xcompress"
77
homepage = "https://magiclen.org/xcompress"
88
keywords = ["compression", "decompression", "zip", "archive", "tar"]
@@ -18,7 +18,7 @@ codegen-units = 1
1818
panic = "abort"
1919

2020
[dependencies]
21-
clap = "2.33.1"
21+
clap = "3.1.6"
2222
concat-with = "0.2"
2323
terminal_size = "0.1"
2424

Makefile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
all: ./target/x86_64-unknown-linux-musl/release/xcompress
1+
EXECUTABLE_NAME := xcompress
22

3-
./target/x86_64-unknown-linux-musl/release/xcompress: $(shell find . -type f -iname '*.rs' -o -name 'Cargo.toml' | sed 's/ /\\ /g')
3+
all: ./target/x86_64-unknown-linux-musl/release/$(EXECUTABLE_NAME)
4+
5+
./target/x86_64-unknown-linux-musl/release/$(EXECUTABLE_NAME): $(shell find . -type f -iname '*.rs' -o -name 'Cargo.toml' | sed 's/ /\\ /g')
46
cargo build --release --target x86_64-unknown-linux-musl
5-
strip ./target/x86_64-unknown-linux-musl/release/xcompress
7+
strip ./target/x86_64-unknown-linux-musl/release/$(EXECUTABLE_NAME)
68

79
install:
810
$(MAKE)
9-
sudo cp ./target/x86_64-unknown-linux-musl/release/xcompress /usr/local/bin/xcompress
10-
sudo chown root: /usr/local/bin/xcompress
11-
sudo chmod 0755 /usr/local/bin/xcompress
11+
sudo cp ./target/x86_64-unknown-linux-musl/release/$(EXECUTABLE_NAME) /usr/local/bin/$(EXECUTABLE_NAME)
12+
sudo chown root: /usr/local/bin/$(EXECUTABLE_NAME)
13+
sudo chmod 0755 /usr/local/bin/$(EXECUTABLE_NAME)
1214

1315
uninstall:
14-
sudo rm /usr/local/bin/xcompress
16+
sudo rm /usr/local/bin/$(EXECUTABLE_NAME)
1517

1618
test:
1719
cargo test --verbose

README.md

Lines changed: 42 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -9,59 +9,54 @@ XCompress is a free file archiver utility on Linux, providing multi-format archi
99

1010
```
1111
EXAMPLES:
12-
xcompress a foo.wav # Archives foo.wav to foo.rar
13-
xcompress a foo.wav /root/bar.txt # Archives foo.wav and /root/bar.txt to foo.rar
14-
xcompress a -o /tmp/out.7z foo.wav # Archives foo.wav to /tmp/out.7z
15-
xcompress a -b foo/bar # Archives foo/bar folder to bar.rar as small as possible
16-
xcompress a -p password foo.wav # Archives foo.wav to foo.rar with a password
17-
xcompress x foo.rar # Extracts foo.rar into current working directory
18-
xcompress x foo.tar.gz /tmp/out_folder # Extracts foo.tar.gz into /tmp/out_folder
19-
xcompress x -p password foo.rar # Extracts foo.rar with a password into current working directory
12+
xcompress a foo.wav # Archive foo.wav to foo.rar
13+
xcompress a foo.wav /root/bar.txt # Archive foo.wav and /root/bar.txt to foo.rar
14+
xcompress a -o /tmp/out.7z foo.wav # Archive foo.wav to /tmp/out.7z
15+
xcompress a -b foo/bar # Archive foo/bar folder to bar.rar as small as possible
16+
xcompress a -p password foo.wav # Archive foo.wav to foo.rar with a password
17+
xcompress x foo.rar # Extract foo.rar into current working directory
18+
xcompress x foo.tar.gz /tmp/out_folder # Extract foo.tar.gz into /tmp/out_folder
19+
xcompress x -p password foo.rar # Extract foo.rar with a password into current working directory
2020
2121
USAGE:
22-
xcompress [FLAGS] [OPTIONS] [SUBCOMMAND]
23-
24-
FLAGS:
25-
-q, --quiet Makes programs not print anything on the screen.
26-
-s, --single-thread Uses only one thread.
27-
-h, --help Prints help information
28-
-V, --version Prints version information
22+
xcompress [OPTIONS] [SUBCOMMAND]
2923
3024
OPTIONS:
31-
-p, --password <PASSWORD> Sets password for your archive file. (Only supports 7Z, ZIP and RAR.) Set an
32-
empty string to read a password from stdin.
33-
--7z-path <7Z_PATH> Specifies the path of your 7z executable binary file. [default: 7z]
34-
--bunzip2-path <BUNZIP2_PATH> Specifies the path of your bunzip2 executable binary file. [default: bunzip2]
35-
--bzip2-path <BZIP2_PATH> Specifies the path of your bzip2 executable binary file. [default: bzip2]
36-
--compress-path <COMPRESS_PATH> Specifies the path of your compress executable binary file. [default:
37-
compress]
38-
--gunzip-path <GUNZIP_PATH> Specifies the path of your gunzip executable binary file. [default: gunzip]
39-
--gzip-path <GZIP_PATH> Specifies the path of your gzip executable binary file. [default: gzip]
40-
--lbzip2-path <LBZIP2_PATH> Specifies the path of your lbzip2 executable binary file. [default: lbzip2]
41-
--lunzip-path <LUNZIP_PATH> Specifies the path of your lunzip executable binary file. [default: lunzip]
42-
--lzip-path <LZIP_PATH> Specifies the path of your lzip executable binary file. [default: lzip]
43-
--lzma-path <LZMA_PATH> Specifies the path of your lzma executable binary file. [default: lzma]
44-
--pbzip2-path <PBZIP2_PATH> Specifies the path of your pbzip2 executable binary file. [default: pbzip2]
45-
--pigz-path <PIGZ_PATH> Specifies the path of your pigz executable binary file. [default: pigz]
46-
--plzip-path <PLZIP_PATH> Specifies the path of your plzip executable binary file. [default: plzip]
47-
--pxz-path <PXZ_PATH> Specifies the path of your pxz executable binary file. [default: pxz]
48-
--pzstd-path <PZSTD_PATH> Specifies the path of your pzstd executable binary file. [default: pzstd]
49-
--rar-path <RAR_PATH> Specifies the path of your rar executable binary file. [default: rar]
50-
--tar-path <TAR_PATH> Specifies the path of your tar executable binary file. [default: tar]
51-
--unlzma-path <UNLZMA_PATH> Specifies the path of your unlzma executable binary file. [default: unlzma]
52-
--unrar-path <UNRAR_PATH> Specifies the path of your unrar executable binary file. [default: unrar]
53-
--unxz-path <UNXZ_PATH> Specifies the path of your unxz executable binary file. [default: unxz]
54-
--unzip-path <UNZIP_PATH> Specifies the path of your unzip executable binary file. [default: unzip]
55-
--unzstd-path <UNZSTD_PATH> Specifies the path of your unzstd executable binary file. [default: unzstd]
56-
--xz-path <XZ_PATH> Specifies the path of your xz executable binary file. [default: xz]
57-
--zip-path <ZIP_PATH> Specifies the path of your zip executable binary file. [default: zip]
58-
--zstd-path <ZSTD_PATH> Specifies the path of your zstd executable binary file. [default: zstd]
25+
-p, --password <PASSWORD> Set password for your archive file. (Only supports 7Z, ZIP and RAR.) Set an empty string to read a password from stdin.
26+
--7z-path <7Z_PATH> Specify the path of your 7z executable binary file. [default: 7z]
27+
--bunzip2-path <BUNZIP2_PATH> Specify the path of your bunzip2 executable binary file. [default: bunzip2]
28+
--bzip2-path <BZIP2_PATH> Specify the path of your bzip2 executable binary file. [default: bzip2]
29+
--compress-path <COMPRESS_PATH> Specify the path of your compress executable binary file. [default: compress]
30+
--gunzip-path <GUNZIP_PATH> Specify the path of your gunzip executable binary file. [default: gunzip]
31+
--gzip-path <GZIP_PATH> Specify the path of your gzip executable binary file. [default: gzip]
32+
-h, --help Print help information
33+
--lbzip2-path <LBZIP2_PATH> Specify the path of your lbzip2 executable binary file. [default: lbzip2]
34+
--lunzip-path <LUNZIP_PATH> Specify the path of your lunzip executable binary file. [default: lunzip]
35+
--lzip-path <LZIP_PATH> Specify the path of your lzip executable binary file. [default: lzip]
36+
--lzma-path <LZMA_PATH> Specify the path of your lzma executable binary file. [default: lzma]
37+
--pbzip2-path <PBZIP2_PATH> Specify the path of your pbzip2 executable binary file. [default: pbzip2]
38+
--pigz-path <PIGZ_PATH> Specify the path of your pigz executable binary file. [default: pigz]
39+
--plzip-path <PLZIP_PATH> Specify the path of your plzip executable binary file. [default: plzip]
40+
--pxz-path <PXZ_PATH> Specify the path of your pxz executable binary file. [default: pxz]
41+
--pzstd-path <PZSTD_PATH> Specify the path of your pzstd executable binary file. [default: pzstd]
42+
-q, --quiet Make programs not print anything on the screen.
43+
--rar-path <RAR_PATH> Specify the path of your rar executable binary file. [default: rar]
44+
-s, --single-thread Use only one thread.
45+
--tar-path <TAR_PATH> Specify the path of your tar executable binary file. [default: tar]
46+
--unlzma-path <UNLZMA_PATH> Specify the path of your unlzma executable binary file. [default: unlzma]
47+
--unrar-path <UNRAR_PATH> Specify the path of your unrar executable binary file. [default: unrar]
48+
--unxz-path <UNXZ_PATH> Specify the path of your unxz executable binary file. [default: unxz]
49+
--unzip-path <UNZIP_PATH> Specify the path of your unzip executable binary file. [default: unzip]
50+
--unzstd-path <UNZSTD_PATH> Specify the path of your unzstd executable binary file. [default: unzstd]
51+
-V, --version Print version information
52+
--xz-path <XZ_PATH> Specify the path of your xz executable binary file. [default: xz]
53+
--zip-path <ZIP_PATH> Specify the path of your zip executable binary file. [default: zip]
54+
--zstd-path <ZSTD_PATH> Specify the path of your zstd executable binary file. [default: zstd]
5955
6056
SUBCOMMANDS:
61-
a Adds files to archive. Excludes base directory from names. (e.g. add /path/to/folder, you can always get
62-
the "folder" in the root of the archive file, instead of /path/to/folder.)
63-
help Prints this message or the help of the given subcommand(s)
64-
x Extracts files with full path.
57+
a Add files to archive. Excludes base directory from names. (e.g. add /path/to/folder, you can always get the "folder" in the root of the archive file, instead of /path/to/folder.)
58+
help Print this message or the help of the given subcommand(s)
59+
x Extract files with full path.
6560
```
6661

6762
## License

0 commit comments

Comments
 (0)