Shellcheck fixes

This commit is contained in:
ViViDboarder 2023-03-08 15:03:28 -08:00
parent a9937c3f33
commit c57822263e

View File

@ -276,9 +276,9 @@ link () {
local target="$2"
if [ -f "$src" ]; then
src="$src"
true
elif [ -d "$src" ]; then
src="$src"
true
elif [ -f "$cookbook_assets_source" ]; then
src="$cookbook_assets_source"
elif [ -f "$default_assets_source" ]; then
@ -304,9 +304,9 @@ try_link () {
local target="$2"
if [ -f "$src" ]; then
src="$src"
true
elif [ -d "$src" ]; then
src="$src"
true
elif [ -f "$cookbook_assets_source" ]; then
src="$cookbook_assets_source"
elif [ -f "$default_assets_source" ]; then
@ -355,7 +355,7 @@ add_user () {
generate_password() {
local l=$1
[ "$l" == "" ] && l=8
tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs
tr -dc A-Za-z0-9_ < /dev/urandom | head -c "${l}" | xargs
}
#