GitHubのミラーです
https://github.com/Hayao0819/wfa
Révision | 073a78a6f7b0212399541ed1629418cccba6385e (tree) |
---|---|
l'heure | 2020-12-24 15:21:08 |
Auteur | hayao <shun819.mail@gmai...> |
Commiter | hayao |
[update] : Added package check
@@ -1106,7 +1106,18 @@ operation_version() { | ||
1106 | 1106 | } |
1107 | 1107 | |
1108 | 1108 | operation_remove() { |
1109 | - run_pacman ${pacman_args} "${specified_packages[@]}" | |
1109 | + local _package _not_found=false | |
1110 | + for _package in ${specified_packages[@]}; do | |
1111 | + if ! check_installed_package "${_package}"; then | |
1112 | + msg_error "target not found: %s" "${_package}" | |
1113 | + _not_found=true | |
1114 | + fi | |
1115 | + done | |
1116 | + if [[ "${_not_found}" = true ]]; then | |
1117 | + exit 1 | |
1118 | + else | |
1119 | + run_pacman ${pacman_args} "${specified_packages[@]}" | |
1120 | + fi | |
1110 | 1121 | } |
1111 | 1122 | |
1112 | 1123 | # Usage: install_package <package1> <package2>... |