OSDN Git Service
(root)
/
alterlinux
/
alterlinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1079a2d
)
[update] : Use cut instead of awk (keyring.sh)
author
hayao
<shun819.mail@gmail.com>
Sun, 27 Sep 2020 02:26:04 +0000
(11:26 +0900)
committer
hayao
<shun819.mail@gmail.com>
Sun, 27 Sep 2020 02:26:04 +0000
(11:26 +0900)
tools/keyring.sh
patch
|
blob
|
history
diff --git
a/tools/keyring.sh
b/tools/keyring.sh
index
adf38a0
..
b592083
100755
(executable)
--- a/
tools/keyring.sh
+++ b/
tools/keyring.sh
@@
-116,6
+116,13
@@
msg_error() {
}
+# Usage: getclm <number>
+# 標準入力から値を受けとり、引数で指定された列を抽出します。
+getclm() {
+ echo "$(cat -)" | cut -d " " -f "${1}"
+}
+
+
# Show usage
_usage () {
echo "usage ${0} [options]"
@@
-140,7
+147,7
@@
checkpkg() {
msg_error "Multiple package specification is not available."
fi
- if [[ -n $( pacman -Q "${_pkg}" 2> /dev/null|
awk '{print $1}'
) ]]; then
+ if [[ -n $( pacman -Q "${_pkg}" 2> /dev/null|
getclm 1
) ]]; then
echo -n "true"
else
echo -n "false"