]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/ar/tc/extract-nonexistent/out/valid.shar
Import ELF Tool Chain snapshot at r3668
[FreeBSD/FreeBSD.git] / test / ar / tc / extract-nonexistent / out / valid.shar
1 #!/bin/sh
2 # This is a shell archive (produced by GNU sharutils 4.15.2).
3 # To extract the files from this archive, save it to some FILE, remove
4 # everything before the '#!/bin/sh' line above, then type 'sh FILE'.
5 #
6 lock_dir=_sh05539
7 # Made on 2018-09-30 19:46 BST by <jkoshy@erebor>.
8 # Source directory was '/home/jkoshy/Work/Elftoolchain/trunk/test/ar/tc/extract-nonexistent/in'.
9 #
10 # Existing files will *not* be overwritten, unless '-c' is specified.
11 #
12 # This shar contains:
13 # length mode       name
14 # ------ ---------- ------------------------------------------
15 #     80 -rw-rw-r-- valid.a
16 #
17 if test "X$1" = "X-c"
18 then keep_file=''
19 else keep_file=true
20 fi
21 echo=echo
22 shar_tty=
23 shar_n=
24 shar_c='\n'
25 if test ! -d ${lock_dir} ; then :
26 else ${echo} "lock directory ${lock_dir} exists"
27      exit 1
28 fi
29 if mkdir ${lock_dir} ; then :
30 else ${echo} "failed to create ${lock_dir} lock directory"
31      exit 1
32 fi
33 # ============= valid.a ==============
34 if test -n "${keep_file}" && test -f 'valid.a'
35 then
36 ${echo} "x - SKIPPING valid.a (file already exists)"
37
38 else
39 ${echo} "x - extracting valid.a (text)"
40   sed 's/^X//' << 'SHAR_EOF' > 'valid.a' &&
41 X!<arch>
42 Xs1/             0           0     0     644     12        `
43 Xs1-contents
44 SHAR_EOF
45 :
46 if test $? -ne 0
47 then ${echo} "restore of valid.a failed"
48 fi
49 fi
50 if rm -fr ${lock_dir}
51 then ${echo} "x - removed lock directory ${lock_dir}."
52 else ${echo} "x - failed to remove lock directory ${lock_dir}."
53      exit 1
54 fi
55 exit 0