pacman-key: add vim modeline and fix whitespace issues
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
80b024d56a
commit
361b6a9403
1 changed files with 8 additions and 6 deletions
|
@ -87,12 +87,12 @@ There is NO WARRANTY, to the extent permitted by law.\n")"
|
||||||
# 'key', 'equal sign' and 'value' can be surrounded by random whitespace
|
# 'key', 'equal sign' and 'value' can be surrounded by random whitespace
|
||||||
# Usage: get_from "$file" "$key" # returns the value for the first matching key in the file
|
# Usage: get_from "$file" "$key" # returns the value for the first matching key in the file
|
||||||
get_from() {
|
get_from() {
|
||||||
while read key _ value; do
|
while read key _ value; do
|
||||||
if [[ $key = $2 ]]; then
|
if [[ $key = $2 ]]; then
|
||||||
echo "$value"
|
echo "$value"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done < "$1"
|
done < "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
reload_keyring() {
|
reload_keyring() {
|
||||||
|
@ -328,3 +328,5 @@ case "${command}" in
|
||||||
error "$(gettext "Unknown command:") $command"
|
error "$(gettext "Unknown command:") $command"
|
||||||
usage; exit 1 ;;
|
usage; exit 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# vim: set ts=2 sw=2 noet:
|
||||||
|
|
Loading…
Add table
Reference in a new issue