From 1b88cd5ee8510e90e69f885bfd730ce57621781c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 03:11:49 +0200 Subject: Adding upstream version 3:4.8.31. Signed-off-by: Daniel Baumann --- src/vfs/shell/helpers/utime | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/vfs/shell/helpers/utime (limited to 'src/vfs/shell/helpers/utime') diff --git a/src/vfs/shell/helpers/utime b/src/vfs/shell/helpers/utime new file mode 100644 index 0000000..a563431 --- /dev/null +++ b/src/vfs/shell/helpers/utime @@ -0,0 +1,12 @@ +if TZ=UTC touch -h -m -d "$SHELL_TOUCHMTIME_W_NSEC" "/${SHELL_FILENAME}" 2>/dev/null && \ + TZ=UTC touch -h -a -d "$SHELL_TOUCHATIME_W_NSEC" "/${SHELL_FILENAME}" 2>/dev/null; then + echo "### 000" +elif TZ=UTC touch -h -m -t $SHELL_TOUCHMTIME "/${SHELL_FILENAME}" 2>/dev/null && \ + TZ=UTC touch -h -a -t $SHELL_TOUCHATIME "/${SHELL_FILENAME}" 2>/dev/null; then + echo "### 000" +elif [ -n "$SHELL_HAVE_PERL" ] && + perl -e 'utime '$SHELL_FILEATIME','$SHELL_FILEMTIME',@ARGV;' "/${SHELL_FILENAME}" 2>/dev/null; then + echo "### 000" +else + echo "### 500" +fi -- cgit v1.2.3