summaryrefslogtreecommitdiff
path: root/git-repo
diff options
context:
space:
mode:
authorYves Fischer <yvesf+git@xapek.org>2017-03-01 21:27:06 +0000
committerYves Fischer <yvesf+git@xapek.org>2017-03-01 21:28:55 +0000
commit7579ce9e26740725708d48f9911d9711814767e3 (patch)
tree0954f786cde374c2e15d3eef9f4e2a8c26c47d4b /git-repo
parentcb6fa05c1e44fa39838d86919a6c2d72a94653d9 (diff)
downloadgit-repo-7579ce9e26740725708d48f9911d9711814767e3.tar.gz
git-repo-7579ce9e26740725708d48f9911d9711814767e3.zip
Adapt for Linux
Diffstat (limited to 'git-repo')
-rwxr-xr-xgit-repo8
1 files 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)