[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:01:37 +02:00
parent 9995f83462
commit 6c8dc34b7f
2 changed files with 2 additions and 2 deletions

View file

@ -611,7 +611,7 @@ compress_images(){
make_checksum "${iso_file}"
${sign} && sign_iso "${iso_file}"
${torrent} && make_torrent
chown -R "${OWNER}:${OWNER}" "${iso_dir}"
chown -R "${OWNER}:$(id --group ${OWNER})" "${iso_dir}"
show_elapsed_time "${FUNCNAME}" "${timer}"
}

View file

@ -250,7 +250,7 @@ move_to_cache(){
mv $src ${pkg_dir}/
${sign} && sign_pkg "${src##*/}"
[[ -n $PKGDEST ]] && rm "$1"
chown -R "${OWNER}:${OWNER}" "${pkg_dir}"
chown -R "${OWNER}:$(id --group ${OWNER})" "${pkg_dir}"
}
archive_logs(){