Fix ShellCheck lint issue id 2220, drop gawk inplace. Add centos

support.
pull/117/head
Carlos Hernandez 7 years ago
parent 5c349648da
commit d71c27f9a2

@ -10,6 +10,8 @@ function add {
i) auto_ignore=1;;
h) _show_manual_for "add";;
*) _invalid_option;;
esac
done

@ -12,6 +12,8 @@ function changes {
p) passphrase=$OPTARG;;
d) homedir=$OPTARG;;
*) _invalid_option;;
esac
done

@ -11,6 +11,8 @@ function clean {
v) verbose="v";;
h) _show_manual_for 'clean';;
*) _invalid_option;;
esac
done

@ -62,7 +62,7 @@ function _get_file_hash {
local file_hash
checksum_local="$(_get_checksum_local)"
file_hash=$($checksum_local "$input_path" | awk '{print $1}')
file_hash=$($checksum_local "$input_path" | gawk '{print $1}')
echo "$file_hash"
}
@ -74,7 +74,7 @@ function _optional_fsdb_update_hash {
fsdb=$(_get_secrets_dir_paths_mapping)
gawk -i inplace -v key="$key" -v hash="$hash" "$AWK_FSDB_UPDATE_HASH" "$fsdb"
_gawk_inplace -v key="$key" -v hash="$hash" "'$AWK_FSDB_UPDATE_HASH'" "$fsdb"
}
@ -97,6 +97,8 @@ function hide {
v) verbose='v';;
h) _show_manual_for 'hide';;
*) _invalid_option;;
esac
done

@ -36,7 +36,7 @@ function gitignore_add_pattern {
gitignore_file_path=$(_append_root_path '.gitignore')
_maybe_create_gitignore
gawk -i inplace -v pattern="$pattern" "$AWK_ADD_TO_GITIGNORE" "$gitignore_file_path"
_gawk_inplace -v pattern="$pattern" "'$AWK_ADD_TO_GITIGNORE'" "$gitignore_file_path"
}
function init {
@ -45,6 +45,8 @@ function init {
while getopts 'h' opt; do
case "$opt" in
h) _show_manual_for 'init';;
*) _invalid_option;;
esac
done

@ -7,6 +7,8 @@ function killperson {
while getopts 'h' opt; do
case "$opt" in
h) _show_manual_for 'killperson';;
*) _invalid_option;;
esac
done

@ -7,6 +7,8 @@ function list {
while getopts 'h' opt; do
case "$opt" in
h) _show_manual_for 'list';;
*) _invalid_option;;
esac
done

@ -11,6 +11,8 @@ function remove {
c) clean=1;;
h) _show_manual_for 'remove';;
*) _invalid_option;;
esac
done
@ -39,7 +41,6 @@ function remove {
fi
# Deleting it from path mappings:
# _delete_line "$normalized_path" "$path_mappings"
# Remove record from fsdb with matching key
local key
key="$normalized_path"

@ -17,6 +17,8 @@ function reveal {
p) passphrase=$OPTARG;;
d) homedir=$OPTARG;;
*) _invalid_option;;
esac
done

@ -29,6 +29,8 @@ function tell {
m) self_email=1;;
d) homedir=$OPTARG;;
*) _invalid_option;;
esac
done

@ -7,6 +7,8 @@ function usage {
while getopts "h?" opt; do
case "$opt" in
h) _show_manual_for "usage";;
*) _invalid_option;;
esac
done

@ -7,6 +7,8 @@ function whoknows {
while getopts "h?" opt; do
case "$opt" in
h) _show_manual_for "whoknows";;
*) _invalid_option;;
esac
done

Loading…
Cancel
Save