From 7579ce9e26740725708d48f9911d9711814767e3 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Wed, 1 Mar 2017 21:27:06 +0000 Subject: Adapt for Linux --- git-repo | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/git-repo b/git-repo index 55cfa1e..885aae2 100755 --- a/git-repo +++ b/git-repo @@ -25,7 +25,7 @@ do_list() { echo -n "Working.. listing repositories under $root_path" for repo_path in $(_list_repo_dirs $root_path | sort); do echo -ne "\r" # to remove working - eval $(stat -f 'local repo_path_uid=%u repo_path_gid=%g repo_path_mode=%Lp' "$repo_path") + eval $(stat --format 'local repo_path_uid=%u repo_path_gid=%g repo_path_mode=%a' "$repo_path") if [ "$repo_path_uid" != "$UID" ]; then # so there must be a matching gid local pass=false @@ -119,10 +119,10 @@ do_show() { continue fi - local repo_file_mode=$(stat -f %Lp "$repo_path") - local repo_file_uid=$(stat -f %u "$repo_path") + local repo_file_mode=$(stat --format %a "$repo_path") + local repo_file_uid=$(stat --format %u "$repo_path") local repo_file_user=$(_getent passwd $repo_file_uid) - local repo_file_gid=$(stat -f %g "$repo_path") + local repo_file_gid=$(stat --format %g "$repo_path") local repo_file_group=$(_getent group $repo_file_gid) local repo_git_shared=$(GIT_DIR="$repo_path" git config --get core.sharedrepository) -- cgit v1.2.1