diff options
author | Jean Delvare <jdelvare@suse.de> | 2012-02-01 18:08:48 +0100 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2012-02-01 18:08:48 +0100 |
commit | 2b47cd327f7d1f7692128ff1fa24a85b92733058 (patch) | |
tree | 92698f7e0928fe2fc8d5ad7630f57f0a3539e205 /quilt | |
parent | ef0e5378ed163dbea21bccec89141344498151c2 (diff) | |
download | quilt-2b47cd327f7d1f7692128ff1fa24a85b92733058.tar.gz |
BSD compatibility: stat
The stat command on BSD takes different parameters from the GNU one.
Let configure find out which variant is available, and use the right
parameters.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Diffstat (limited to 'quilt')
-rw-r--r-- | quilt/scripts/backup-files.in | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/quilt/scripts/backup-files.in b/quilt/scripts/backup-files.in index f691ed4..728fced 100644 --- a/quilt/scripts/backup-files.in +++ b/quilt/scripts/backup-files.in @@ -66,7 +66,7 @@ ensure_nolinks() { local filename="$1" local link_count dirname basename tmpname - link_count=$(stat -c '%h' "$filename") + link_count=$(stat @STAT_HARDLINK@ "$filename") if [ -z "$link_count" ] || [ "$link_count" -gt 1 ]; then dirname=$(dirname "$filename") basename=$(basename "$filename") @@ -92,7 +92,7 @@ process_file() { touch "$backup" else $ECHO "Copying $file" - if [ -n "$OPT_NOLINKS" -a "$(stat -c '%h' "$file")" = "1" ]; then + if [ -n "$OPT_NOLINKS" -a "$(stat @STAT_HARDLINK@ "$file")" = "1" ]; then copy_file "$file" "$backup" else link_or_copy_file "$file" "$backup" @@ -131,7 +131,7 @@ process_file() { if [ -e "$file" ]; then rm "$file" fi - if [ -n "$OPT_NOLINKS" -a "$(stat -c '%h' "$backup")" != "1" ]; then + if [ -n "$OPT_NOLINKS" -a "$(stat @STAT_HARDLINK@ "$backup")" != "1" ]; then copy_file "$backup" "$file" else link_or_copy_file "$backup" "$file" |