[util-*] use given primary group of user in chown cmd

- don't assume that the primary group of a user is named the same as the user itself
- fixes https://github.com/manjaro/manjaro-tools/issues/248
This commit is contained in:
Philip 2016-08-02 20:57:56 +02:00
parent 93b43dc58d
commit f8d5fe7d52
2 changed files with 2 additions and 2 deletions

View file

@ -151,7 +151,7 @@ eval_build_list "${list_dir_pkg}" "${build_list_pkg}"
prepare_dir "${pkg_dir}"
chown ${OWNER}:${OWNER} "${pkg_dir}"
chown ${OWNER}:$(id --group ${OWNER}) "${pkg_dir}"
init_base_devel

View file

@ -597,7 +597,7 @@ compress_images(){
local timer=$(get_timer)
run_safe "make_iso"
make_checksum "${iso_file}"
chown -R "${OWNER}:users" "${iso_dir}"
chown -R "${OWNER}:$(id --group ${OWNER})" "${iso_dir}"
${sign} && sign_iso "${iso_file}"
show_elapsed_time "${FUNCNAME}" "${timer}"
}