Skip to content

Commit b21e227

Browse files
committed
optimized
1 parent a22f0da commit b21e227

23 files changed

+56
-64
lines changed

.github/workflows/alpinelinux.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ jobs:
3535
- run: ./output/bin/uppm -h
3636
- run: ./output/bin/uppm -V
3737

38-
- run: ./output/bin/uppm env
39-
- run: ./output/bin/uppm env -v
38+
- run: ./output/bin/uppm about
39+
- run: ./output/bin/uppm about -v
4040

4141
- run: ./output/bin/uppm integrate zsh
4242
- run: ./output/bin/uppm integrate zsh -v

.github/workflows/archlinux.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ jobs:
3333
- run: ./output/bin/uppm -h
3434
- run: ./output/bin/uppm -V
3535

36-
- run: ./output/bin/uppm env
37-
- run: ./output/bin/uppm env -v
36+
- run: ./output/bin/uppm about
37+
- run: ./output/bin/uppm about -v
3838

3939
- run: ./output/bin/uppm integrate zsh
4040

.github/workflows/centos.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ jobs:
4747
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm -h
4848
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm -V
4949

50-
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm env
51-
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm env -v
50+
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm about
51+
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm about -v
5252

5353
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm integrate zsh
5454

@@ -148,8 +148,8 @@ jobs:
148148
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm -h
149149
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm -V
150150

151-
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm env
152-
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm env -v
151+
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm about
152+
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm about -v
153153

154154
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm integrate zsh
155155

@@ -255,8 +255,8 @@ jobs:
255255
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm -h
256256
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm -V
257257

258-
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm env
259-
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm env -v
258+
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm about
259+
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm about -v
260260

261261
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm integrate zsh
262262

.github/workflows/debian.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ jobs:
4646
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm -h
4747
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm -V
4848

49-
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm env
50-
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm env -v
49+
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm about
50+
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm about -v
5151

5252
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm integrate zsh
5353

.github/workflows/fedora.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ jobs:
3636
- run: ./output/bin/uppm -h
3737
- run: ./output/bin/uppm -V
3838

39-
- run: ./output/bin/uppm env
40-
- run: ./output/bin/uppm env -v
39+
- run: ./output/bin/uppm about
40+
- run: ./output/bin/uppm about -v
4141

4242
- run: ./output/bin/uppm integrate zsh
4343

.github/workflows/freebsd.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ jobs:
3838
run ./output/bin/uppm -h
3939
run ./output/bin/uppm -V
4040
41-
run ./output/bin/uppm env
42-
run ./output/bin/uppm env -v
41+
run ./output/bin/uppm about
42+
run ./output/bin/uppm about -v
4343
4444
run ./output/bin/uppm integrate zsh
4545

.github/workflows/gentoo.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ jobs:
3030
- run: ./output/bin/uppm -h
3131
- run: ./output/bin/uppm -V
3232

33-
- run: ./output/bin/uppm env
34-
- run: ./output/bin/uppm env -v
33+
- run: ./output/bin/uppm about
34+
- run: ./output/bin/uppm about -v
3535

3636
- run: ./output/bin/uppm integrate zsh
3737

.github/workflows/linuxmint.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ jobs:
4747
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm -h
4848
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm -V
4949

50-
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm env
51-
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm env -v
50+
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm about
51+
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm about -v
5252

5353
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm integrate zsh
5454

.github/workflows/macos.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ jobs:
5151
- run: ./output/bin/uppm -h
5252
- run: ./output/bin/uppm -V
5353

54-
- run: ./output/bin/uppm env
55-
- run: ./output/bin/uppm env -v
54+
- run: ./output/bin/uppm about
55+
- run: ./output/bin/uppm about -v
5656

5757
- run: ./output/bin/uppm integrate zsh -v
5858

@@ -163,8 +163,8 @@ jobs:
163163
- run: ./output/bin/uppm -h
164164
- run: ./output/bin/uppm -V
165165

166-
- run: ./output/bin/uppm env
167-
- run: ./output/bin/uppm env -v
166+
- run: ./output/bin/uppm about
167+
- run: ./output/bin/uppm about -v
168168

169169
- run: ./output/bin/uppm integrate zsh -v
170170

@@ -279,8 +279,8 @@ jobs:
279279
- run: ./output/bin/uppm -h
280280
- run: ./output/bin/uppm -V
281281

282-
- run: ./output/bin/uppm env
283-
- run: ./output/bin/uppm env -v
282+
- run: ./output/bin/uppm about
283+
- run: ./output/bin/uppm about -v
284284

285285
- run: ./output/bin/uppm integrate zsh -v
286286

@@ -392,8 +392,8 @@ jobs:
392392
- run: ./output/bin/uppm -h
393393
- run: ./output/bin/uppm -V
394394

395-
- run: ./output/bin/uppm env
396-
- run: ./output/bin/uppm env -v
395+
- run: ./output/bin/uppm about
396+
- run: ./output/bin/uppm about -v
397397

398398
- run: ./output/bin/uppm integrate zsh -v
399399

.github/workflows/manjaro.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ jobs:
3232
- run: ./output/bin/uppm -h
3333
- run: ./output/bin/uppm -V
3434

35-
- run: ./output/bin/uppm env
36-
- run: ./output/bin/uppm env -v
35+
- run: ./output/bin/uppm about
36+
- run: ./output/bin/uppm about -v
3737

3838
- run: ./output/bin/uppm integrate zsh
3939

.github/workflows/netbsd.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ jobs:
5151
run ./output/bin/uppm -h
5252
run ./output/bin/uppm -V
5353
54-
run ./output/bin/uppm env
55-
run ./output/bin/uppm env -v
54+
run ./output/bin/uppm about
55+
run ./output/bin/uppm about -v
5656
5757
run ./output/bin/uppm integrate zsh
5858

.github/workflows/openbsd.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ jobs:
3838
run ./output/bin/uppm -h
3939
run ./output/bin/uppm -V
4040
41-
run ./output/bin/uppm env
42-
run ./output/bin/uppm env -v
41+
run ./output/bin/uppm about
42+
run ./output/bin/uppm about -v
4343
4444
run ./output/bin/uppm integrate zsh
4545

.github/workflows/opensuse.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ jobs:
3636
- run: ./output/bin/uppm -h
3737
- run: ./output/bin/uppm -V
3838

39-
- run: ./output/bin/uppm env
40-
- run: ./output/bin/uppm env -v
39+
- run: ./output/bin/uppm about
40+
- run: ./output/bin/uppm about -v
4141

4242
- run: ./output/bin/uppm integrate zsh
4343

.github/workflows/ppkg.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ jobs:
4141
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm -h
4242
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm -V
4343

44-
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm env
45-
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm env -v
44+
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm about
45+
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm about -v
4646

4747
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm integrate zsh
4848

.github/workflows/rockylinux.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ jobs:
4949
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm -h
5050
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm -V
5151

52-
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm env
53-
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm env -v
52+
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm about
53+
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm about -v
5454

5555
- run: ~/.ppkg/installed/linux-glibc-x86_64/uppm/bin/uppm integrate zsh
5656

.github/workflows/ubuntu.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ jobs:
5858
- run: ./output/bin/uppm -h
5959
- run: ./output/bin/uppm -V
6060

61-
- run: ./output/bin/uppm env
62-
- run: ./output/bin/uppm env -v
61+
- run: ./output/bin/uppm about
62+
- run: ./output/bin/uppm about -v
6363

6464
- run: ./output/bin/uppm integrate zsh
6565

.github/workflows/valgrind.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ jobs:
5555
- run: $VALGRIND ./output/bin/uppm -h
5656
- run: $VALGRIND ./output/bin/uppm -V
5757

58-
- run: $VALGRIND ./output/bin/uppm env
59-
- run: $VALGRIND ./output/bin/uppm env -v
58+
- run: $VALGRIND ./output/bin/uppm about
59+
- run: $VALGRIND ./output/bin/uppm about -v
6060

6161
- run: $VALGRIND ./output/bin/uppm integrate zsh
6262

.github/workflows/voidlinux.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ jobs:
3737
- run: ./output/bin/uppm -h
3838
- run: ./output/bin/uppm -V
3939

40-
- run: ./output/bin/uppm env
41-
- run: ./output/bin/uppm env -v
40+
- run: ./output/bin/uppm about
41+
- run: ./output/bin/uppm about -v
4242

4343
- run: ./output/bin/uppm integrate zsh
4444

README.md

+1-7
Original file line numberDiff line numberDiff line change
@@ -244,13 +244,7 @@ all relevant directories and files are located in `~/.uppm` directory.
244244
* **show basic information about this software**
245245

246246
```bash
247-
uppm env
248-
```
249-
250-
* **show build information about this software**
251-
252-
```bash
253-
uppm buildinfo
247+
uppm about
254248
```
255249

256250
* **show basic information about your current running operation system**

src/env.c src/about.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static int uppm_list_dirs(const char * installedDir, size_t installedDirLength,
6666
return UPPM_OK;
6767
}
6868

69-
int uppm_env(bool verbose) {
69+
int uppm_about(bool verbose) {
7070
char uppmHomeDir[256];
7171
size_t uppmHomeDirLength;
7272

@@ -90,7 +90,9 @@ int uppm_env(bool verbose) {
9090

9191
free(selfRealPath);
9292

93-
printf("uppm.website : %s\n", "https://github.com/leleliu008/uppm");
93+
printf("uppm.website : %s\n\n", "https://github.com/leleliu008/uppm");
94+
95+
uppm_buildinfo();
9496

9597
if (!verbose) {
9698
return UPPM_OK;

src/help.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ int uppm_help() {
1717
COLOR_OFF
1818
" show version of this command.\n\n"
1919
COLOR_GREEN
20-
"uppm env\n"
20+
"uppm about\n"
2121
COLOR_OFF
2222
" show basic information about this software.\n\n"
2323
COLOR_GREEN
@@ -214,7 +214,7 @@ int uppm_help() {
214214
"uppm --version\n"
215215
"uppm -V\n"
216216
" show version of this command.\n\n"
217-
"uppm env\n"
217+
"uppm about\n"
218218
" show basic information about this software.\n\n"
219219
"uppm buildinfo\n"
220220
" show build information about this software.\n\n"

src/uppm.c

+2-6
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,8 @@ int uppm_main(int argc, char* argv[]) {
3737
return uppm_sysinfo();
3838
}
3939

40-
if (strcmp(argv[1], "buildinfo") == 0) {
41-
return uppm_buildinfo();
42-
}
43-
44-
if (strcmp(argv[1], "env") == 0) {
45-
int ret = uppm_env(verbose);
40+
if (strcmp(argv[1], "about") == 0) {
41+
int ret = uppm_about(verbose);
4642

4743
if (ret == UPPM_ERROR_ENV_HOME_NOT_SET) {
4844
fprintf(stderr, "%s\n", "HOME environment variable is not set.\n");

src/uppm.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ int uppm_sysinfo();
198198

199199
int uppm_buildinfo();
200200

201-
int uppm_env(bool verbose);
201+
int uppm_about(bool verbose);
202202

203203
int uppm_home_dir(char buf[], size_t bufSize, size_t * outSize);
204204

0 commit comments

Comments
 (0)