X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=bin%2Fbackup-status;h=32ef7c471f2660f2a71c461e8e497bbad7875dba;hb=4707fb207f10c500aa30b21a69ec1ea27e8b76d9;hp=aa83ef9baa650d813f1e78d105c512dfd0679032;hpb=eb4907464ea621fc0fbe9e21a5444d8adcce056c;p=backup-script.git diff --git a/bin/backup-status b/bin/backup-status index aa83ef9..32ef7c4 100755 --- a/bin/backup-status +++ b/bin/backup-status @@ -1,7 +1,7 @@ #!/bin/bash # # backup-script system for cloning systems using rsync -# Copyright (c)2008-2014 Alexander Barton, alex@barton.de +# Copyright (c)2008-2015 Alexander Barton, alex@barton.de # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -44,8 +44,12 @@ Check_Stamp() { # $2: padding if [ -f "$1" ]; then - last=`stat "$1" | grep "^Modify: " \ - | cut -d':' -f2- | cut -d. -f1` + if [ `uname` = "Linux" ]; then + last=`LC_ALL=C stat "$1" | grep "^Modify: " \ + | cut -d':' -f2- | cut -d. -f1` + else + last=`LC_ALL=C stat -f "%Sc" "$1"` + fi [ -n "$last" ] && echo "$2 - Date:" $last unset code source "$1"