diff options
Diffstat (limited to 'test/ar/tc/extract-nonexistent/out/valid.shar')
-rw-r--r-- | test/ar/tc/extract-nonexistent/out/valid.shar | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/test/ar/tc/extract-nonexistent/out/valid.shar b/test/ar/tc/extract-nonexistent/out/valid.shar new file mode 100644 index 0000000000000..b5a569ea5c5ec --- /dev/null +++ b/test/ar/tc/extract-nonexistent/out/valid.shar @@ -0,0 +1,55 @@ +#!/bin/sh +# This is a shell archive (produced by GNU sharutils 4.15.2). +# To extract the files from this archive, save it to some FILE, remove +# everything before the '#!/bin/sh' line above, then type 'sh FILE'. +# +lock_dir=_sh05539 +# Made on 2018-09-30 19:46 BST by <jkoshy@erebor>. +# Source directory was '/home/jkoshy/Work/Elftoolchain/trunk/test/ar/tc/extract-nonexistent/in'. +# +# Existing files will *not* be overwritten, unless '-c' is specified. +# +# This shar contains: +# length mode name +# ------ ---------- ------------------------------------------ +# 80 -rw-rw-r-- valid.a +# +if test "X$1" = "X-c" +then keep_file='' +else keep_file=true +fi +echo=echo +shar_tty= +shar_n= +shar_c='\n' +if test ! -d ${lock_dir} ; then : +else ${echo} "lock directory ${lock_dir} exists" + exit 1 +fi +if mkdir ${lock_dir} ; then : +else ${echo} "failed to create ${lock_dir} lock directory" + exit 1 +fi +# ============= valid.a ============== +if test -n "${keep_file}" && test -f 'valid.a' +then +${echo} "x - SKIPPING valid.a (file already exists)" + +else +${echo} "x - extracting valid.a (text)" + sed 's/^X//' << 'SHAR_EOF' > 'valid.a' && +X!<arch> +Xs1/ 0 0 0 644 12 ` +Xs1-contents +SHAR_EOF +: +if test $? -ne 0 +then ${echo} "restore of valid.a failed" +fi +fi +if rm -fr ${lock_dir} +then ${echo} "x - removed lock directory ${lock_dir}." +else ${echo} "x - failed to remove lock directory ${lock_dir}." + exit 1 +fi +exit 0 |