File: touch

package info (click to toggle)
kernel-image-2.4.18-i386bf 2.4.18-5
  • links: PTS
  • area: main
  • in suites: woody
  • size: 108 kB
  • ctags: 5
  • sloc: makefile: 53; sh: 11
file content (18 lines) | stat: -rwxr-xr-x 271 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

set -e

if [ -z "${1##-*}" ] && [ "$1" != -- ]; then
	exec touch.orig "$@"
fi

trap 'rm -f $TMP' EXIT
TMP=$(tempfile)

# Create the files if they don't exist.
touch.orig -a "$@"

tar -P --remove-files -cf $TMP "$@"
tar xfP $TMP
rm -f $TMP
exec touch.orig "$@"