GitHubのミラーです
https://github.com/Hayao0819/wfa
Revisão | 66630d664c31e3dbb4d6d5e86e8d0a9cda463770 (tree) |
---|---|
Hora | 2020-12-24 15:08:58 |
Autor | hayao <shun819.mail@gmai...> |
Commiter | hayao |
[update] : Added --cascade
@@ -1242,7 +1242,7 @@ run_operation() { | ||
1242 | 1242 | # Parse options |
1243 | 1243 | ARGUMENT="${@}" |
1244 | 1244 | _opt_short="AQRShVdb:aysucq" |
1245 | -_opt_long="query,remove,sync,help,version,debug,dbpath:,aururl,aur,noconfirm,config:,makepkg:,mflags:,pacman:,git:,gitflags:,gpg:,gpgflags:,makepkgconf:,nomakepkgconf,nodeps,refresh,bash-debug,msg-debug,sysupgrade,color:,nocolor,clean,quiet,arch:,confirm,disable-download-timeout,curl:,curlflags:,unneeded,puella,wfa-debug" | |
1245 | +_opt_long="query,remove,sync,help,version,debug,dbpath:,aururl,aur,noconfirm,config:,makepkg:,mflags:,pacman:,git:,gitflags:,gpg:,gpgflags:,makepkgconf:,nomakepkgconf,nodeps,refresh,bash-debug,msg-debug,sysupgrade,color:,nocolor,clean,quiet,arch:,confirm,disable-download-timeout,curl:,curlflags:,unneeded,puella,wfa-debug,cascade" | |
1246 | 1246 | |
1247 | 1247 | OPT=$(getopt -o ${_opt_short} -l ${_opt_long} -- ${ARGUMENT}) |
1248 | 1248 | [[ ${?} != 0 ]] && exit 1 |
@@ -1350,8 +1350,36 @@ while :; do | ||
1350 | 1350 | esac |
1351 | 1351 | shift 1 |
1352 | 1352 | ;; |
1353 | - -c | --clean) | |
1354 | - sync_clean_count=$(( sync_clean_count + 1 )) | |
1353 | + -c | --clean | --cascade) | |
1354 | + case "${1}" | |
1355 | + --clean) | |
1356 | + if [[ "${operation}" = "sync" ]]; then | |
1357 | + sync_clean_count=$(( sync_clean_count + 1 )) | |
1358 | + else | |
1359 | + unavailable_in_this_operation | |
1360 | + fi | |
1361 | + ;; | |
1362 | + --cascade) | |
1363 | + if [[ "${operation}" = "remove" ]]; then | |
1364 | + add_args pacman "--cascade" | |
1365 | + else | |
1366 | + unavailable_in_this_operation | |
1367 | + fi | |
1368 | + ;; | |
1369 | + -c) | |
1370 | + case "${operation}" in | |
1371 | + "sync") | |
1372 | + sync_clean_count=$(( sync_clean_count + 1 )) | |
1373 | + ;; | |
1374 | + "remove") | |
1375 | + add_args pacman "--cascade" | |
1376 | + ;; | |
1377 | + *) | |
1378 | + unavailable_in_this_operation | |
1379 | + ;; | |
1380 | + esac | |
1381 | + ;; | |
1382 | + esac | |
1355 | 1383 | shift 1 |
1356 | 1384 | ;; |
1357 | 1385 | -q | --quiet) |