diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7b8413b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,7 @@ +root = true + +# Force GitHub to display tabs +# mixed with [4] spaces properly. +[kiss] +indent_style = tab +indent_size = 4 diff --git a/kiss b/kiss index 4056dbd..f9f6f58 100755 --- a/kiss +++ b/kiss @@ -1163,7 +1163,9 @@ pkg_updates() { # ownership of files and directories in the rare # case that the repository is owned by a 3rd user. ( - user=$(stat -c %U "$PWD") || user=root + read -r _ _ user _ <<-EOF || user=root + $(ls -ld "$PWD") + EOF id -u "$user" >/dev/null 2>&1 || user=root @@ -1339,7 +1341,11 @@ args() { else log "$pkg" "Need permissions to generate checksums" - user=$(stat -c %U "$repo_dir") as_root tee "$repo_dir/checksums" + read -r _ _ user _ <<-EOF || user=root + $(ls -ld "$PWD") + EOF + + user=$user as_root tee "$repo_dir/checksums" fi }