Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/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=_sh130097
- # Made on 2021-06-28 01:53 CEST by <wzab@wzab>.
- # Source directory was '/tmp/demo'.
- #
- # Existing files will *not* be overwritten, unless '-c' is specified.
- #
- # This shar contains:
- # length mode name
- # ------ ---------- ------------------------------------------
- # 603 -rw-r--r-- load_demo.py
- # 40 -rw-r--r-- t2/agwb/agwb.py
- # 15 -rw-r--r-- t2/agwb/top_const.py
- # 79 -rw-r--r-- t2/agwb/__init__.py
- # 209 -rw-r--r-- t2/agwb/top_v0.py
- # 40 -rw-r--r-- t1/agwb/agwb.py
- # 15 -rw-r--r-- t1/agwb/top_const.py
- # 79 -rw-r--r-- t1/agwb/__init__.py
- # 210 -rw-r--r-- t1/agwb/top_v0.py
- #
- MD5SUM=${MD5SUM-md5sum}
- f=`${MD5SUM} --version | egrep '^md5sum .*(core|text)utils'`
- test -n "${f}" && md5check=true || md5check=false
- ${md5check} || \
- echo 'Note: not verifying md5sums. Consider installing GNU coreutils.'
- if test "X$1" = "X-c"
- then keep_file=''
- else keep_file=true
- fi
- echo=echo
- save_IFS="${IFS}"
- IFS="${IFS}:"
- gettext_dir=
- locale_dir=
- set_echo=false
- for dir in $PATH
- do
- if test -f $dir/gettext \
- && ($dir/gettext --version >/dev/null 2>&1)
- then
- case `$dir/gettext --version 2>&1 | sed 1q` in
- *GNU*) gettext_dir=$dir
- set_echo=true
- break ;;
- esac
- fi
- done
- if ${set_echo}
- then
- set_echo=false
- for dir in $PATH
- do
- if test -f $dir/shar \
- && ($dir/shar --print-text-domain-dir >/dev/null 2>&1)
- then
- locale_dir=`$dir/shar --print-text-domain-dir`
- set_echo=true
- break
- fi
- done
- if ${set_echo}
- then
- TEXTDOMAINDIR=$locale_dir
- export TEXTDOMAINDIR
- TEXTDOMAIN=sharutils
- export TEXTDOMAIN
- echo="$gettext_dir/gettext -s"
- fi
- fi
- IFS="$save_IFS"
- if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null
- then if (echo -n test; echo 1,2,3) | grep n >/dev/null
- then shar_n= shar_c='
- '
- else shar_n=-n shar_c= ; fi
- else shar_n= shar_c='\c' ; fi
- f=shar-touch.$$
- st1=200112312359.59
- st2=123123592001.59
- st2tr=123123592001.5 # old SysV 14-char limit
- st3=1231235901
- if touch -am -t ${st1} ${f} >/dev/null 2>&1 && \
- test ! -f ${st1} && test -f ${f}; then
- shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"'
- elif touch -am ${st2} ${f} >/dev/null 2>&1 && \
- test ! -f ${st2} && test ! -f ${st2tr} && test -f ${f}; then
- shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"'
- elif touch -am ${st3} ${f} >/dev/null 2>&1 && \
- test ! -f ${st3} && test -f ${f}; then
- shar_touch='touch -am $3$4$5$6$2 "$8"'
- else
- shar_touch=:
- echo
- ${echo} 'WARNING: not restoring timestamps. Consider getting and
- installing GNU '\''touch'\'', distributed in GNU coreutils...'
- echo
- fi
- rm -f ${st1} ${st2} ${st2tr} ${st3} ${f}
- #
- if test ! -d ${lock_dir} ; then :
- else ${echo} "lock directory ${lock_dir} exists"
- exit 1
- fi
- if mkdir ${lock_dir}
- then ${echo} "x - created lock directory ${lock_dir}."
- else ${echo} "x - failed to create lock directory ${lock_dir}."
- exit 1
- fi
- # ============= load_demo.py ==============
- if test -n "${keep_file}" && test -f 'load_demo.py'
- then
- ${echo} "x - SKIPPING load_demo.py (file already exists)"
- else
- ${echo} "x - extracting load_demo.py (text)"
- sed 's/^X//' << 'SHAR_EOF' > 'load_demo.py' &&
- import sys
- import importlib
- X
- def load_agwb(lddir,top):
- X sys.path.insert(0,lddir)
- X importlib.import_module('agwb')
- X # Get the class for the top entity
- X res = getattr(sys.modules['agwb'],top)()
- X sys.path.remove(lddir)
- X sys.modules.pop('agwb')
- X mods_to_remove = []
- X for mod in sys.modules.keys():
- X if mod.find('agwb.') == 0:
- X mods_to_remove.append(mod)
- X for mod in mods_to_remove:
- X sys.modules.pop(mod)
- X return res
- X
- at1 = load_agwb('./t1','top_v0')
- at2 = load_agwb('./t2','top_v0')
- print("Call at1.show")
- at1.show()
- print("Call at2.show")
- at2.show()
- X
- SHAR_EOF
- (set 20 21 06 28 00 47 32 'load_demo.py'
- eval "${shar_touch}") && \
- chmod 0644 'load_demo.py'
- if test $? -ne 0
- then ${echo} "restore of load_demo.py failed"
- fi
- if ${md5check}
- then (
- ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'load_demo.py': 'MD5 check failed'
- ) << \SHAR_EOF
- 76ae500f29f46a431c78dbd36919cb0f load_demo.py
- SHAR_EOF
- else
- test `LC_ALL=C wc -c < 'load_demo.py'` -ne 603 && \
- ${echo} "restoration warning: size of 'load_demo.py' is not 603"
- fi
- fi
- # ============= t2/agwb/agwb.py ==============
- if test ! -d 't2'; then
- mkdir 't2'
- if test $? -eq 0
- then ${echo} "x - created directory t2."
- else ${echo} "x - failed to create directory t2."
- exit 1
- fi
- fi
- if test ! -d 't2/agwb'; then
- mkdir 't2/agwb'
- if test $? -eq 0
- then ${echo} "x - created directory t2/agwb."
- else ${echo} "x - failed to create directory t2/agwb."
- exit 1
- fi
- fi
- if test -n "${keep_file}" && test -f 't2/agwb/agwb.py'
- then
- ${echo} "x - SKIPPING t2/agwb/agwb.py (file already exists)"
- else
- ${echo} "x - extracting t2/agwb/agwb.py (text)"
- sed 's/^X//' << 'SHAR_EOF' > 't2/agwb/agwb.py' &&
- desc="That's version from directory t2"
- SHAR_EOF
- (set 20 21 06 28 00 42 33 't2/agwb/agwb.py'
- eval "${shar_touch}") && \
- chmod 0644 't2/agwb/agwb.py'
- if test $? -ne 0
- then ${echo} "restore of t2/agwb/agwb.py failed"
- fi
- if ${md5check}
- then (
- ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 't2/agwb/agwb.py': 'MD5 check failed'
- ) << \SHAR_EOF
- 4a1737fdf0a063cb6a40e763fd85245a t2/agwb/agwb.py
- SHAR_EOF
- else
- test `LC_ALL=C wc -c < 't2/agwb/agwb.py'` -ne 40 && \
- ${echo} "restoration warning: size of 't2/agwb/agwb.py' is not 40"
- fi
- fi
- # ============= t2/agwb/top_const.py ==============
- if test ! -d 't2/agwb'; then
- mkdir 't2/agwb'
- if test $? -eq 0
- then ${echo} "x - created directory t2/agwb."
- else ${echo} "x - failed to create directory t2/agwb."
- exit 1
- fi
- fi
- if test -n "${keep_file}" && test -f 't2/agwb/top_const.py'
- then
- ${echo} "x - SKIPPING t2/agwb/top_const.py (file already exists)"
- else
- ${echo} "x - extracting t2/agwb/top_const.py (text)"
- sed 's/^X//' << 'SHAR_EOF' > 't2/agwb/top_const.py' &&
- C_TYPE_ID=2222
- SHAR_EOF
- (set 20 21 06 28 00 42 40 't2/agwb/top_const.py'
- eval "${shar_touch}") && \
- chmod 0644 't2/agwb/top_const.py'
- if test $? -ne 0
- then ${echo} "restore of t2/agwb/top_const.py failed"
- fi
- if ${md5check}
- then (
- ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 't2/agwb/top_const.py': 'MD5 check failed'
- ) << \SHAR_EOF
- e32dd05b8c4a7f38d1a0f48d0473073c t2/agwb/top_const.py
- SHAR_EOF
- else
- test `LC_ALL=C wc -c < 't2/agwb/top_const.py'` -ne 15 && \
- ${echo} "restoration warning: size of 't2/agwb/top_const.py' is not 15"
- fi
- fi
- # ============= t2/agwb/__init__.py ==============
- if test -n "${keep_file}" && test -f 't2/agwb/__init__.py'
- then
- ${echo} "x - SKIPPING t2/agwb/__init__.py (file already exists)"
- else
- ${echo} "x - extracting t2/agwb/__init__.py (text)"
- sed 's/^X//' << 'SHAR_EOF' > 't2/agwb/__init__.py' &&
- from .agwb import *
- from .top_const import *
- from .top_v0 import top as top_v0
- SHAR_EOF
- (set 20 21 06 28 00 46 48 't2/agwb/__init__.py'
- eval "${shar_touch}") && \
- chmod 0644 't2/agwb/__init__.py'
- if test $? -ne 0
- then ${echo} "restore of t2/agwb/__init__.py failed"
- fi
- if ${md5check}
- then (
- ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 't2/agwb/__init__.py': 'MD5 check failed'
- ) << \SHAR_EOF
- ce4aeea94e7d02e4175bee763e16f351 t2/agwb/__init__.py
- SHAR_EOF
- else
- test `LC_ALL=C wc -c < 't2/agwb/__init__.py'` -ne 79 && \
- ${echo} "restoration warning: size of 't2/agwb/__init__.py' is not 79"
- fi
- fi
- # ============= t2/agwb/top_v0.py ==============
- if test -n "${keep_file}" && test -f 't2/agwb/top_v0.py'
- then
- ${echo} "x - SKIPPING t2/agwb/top_v0.py (file already exists)"
- else
- ${echo} "x - extracting t2/agwb/top_v0.py (text)"
- sed 's/^X//' << 'SHAR_EOF' > 't2/agwb/top_v0.py' &&
- from . import agwb
- from .top_const import *
- class top():
- X def __init__(self):
- X self.rr = agwb.desc
- X def show(self):
- X print("object from t2, desc=",self.rr)
- X print("type ID=",C_TYPE_ID)
- SHAR_EOF
- (set 20 21 06 28 00 53 12 't2/agwb/top_v0.py'
- eval "${shar_touch}") && \
- chmod 0644 't2/agwb/top_v0.py'
- if test $? -ne 0
- then ${echo} "restore of t2/agwb/top_v0.py failed"
- fi
- if ${md5check}
- then (
- ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 't2/agwb/top_v0.py': 'MD5 check failed'
- ) << \SHAR_EOF
- a9df0ac7641bcbd58ff0bbf61f560e16 t2/agwb/top_v0.py
- SHAR_EOF
- else
- test `LC_ALL=C wc -c < 't2/agwb/top_v0.py'` -ne 209 && \
- ${echo} "restoration warning: size of 't2/agwb/top_v0.py' is not 209"
- fi
- fi
- # ============= t1/agwb/agwb.py ==============
- if test ! -d 't1'; then
- mkdir 't1'
- if test $? -eq 0
- then ${echo} "x - created directory t1."
- else ${echo} "x - failed to create directory t1."
- exit 1
- fi
- fi
- if test ! -d 't1/agwb'; then
- mkdir 't1/agwb'
- if test $? -eq 0
- then ${echo} "x - created directory t1/agwb."
- else ${echo} "x - failed to create directory t1/agwb."
- exit 1
- fi
- fi
- if test -n "${keep_file}" && test -f 't1/agwb/agwb.py'
- then
- ${echo} "x - SKIPPING t1/agwb/agwb.py (file already exists)"
- else
- ${echo} "x - extracting t1/agwb/agwb.py (text)"
- sed 's/^X//' << 'SHAR_EOF' > 't1/agwb/agwb.py' &&
- desc="That's version from directory t1"
- SHAR_EOF
- (set 20 21 06 28 00 37 53 't1/agwb/agwb.py'
- eval "${shar_touch}") && \
- chmod 0644 't1/agwb/agwb.py'
- if test $? -ne 0
- then ${echo} "restore of t1/agwb/agwb.py failed"
- fi
- if ${md5check}
- then (
- ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 't1/agwb/agwb.py': 'MD5 check failed'
- ) << \SHAR_EOF
- 034b71c5fe1062ac88a80783dbcd9169 t1/agwb/agwb.py
- SHAR_EOF
- else
- test `LC_ALL=C wc -c < 't1/agwb/agwb.py'` -ne 40 && \
- ${echo} "restoration warning: size of 't1/agwb/agwb.py' is not 40"
- fi
- fi
- # ============= t1/agwb/top_const.py ==============
- if test ! -d 't1/agwb'; then
- mkdir 't1/agwb'
- if test $? -eq 0
- then ${echo} "x - created directory t1/agwb."
- else ${echo} "x - failed to create directory t1/agwb."
- exit 1
- fi
- fi
- if test -n "${keep_file}" && test -f 't1/agwb/top_const.py'
- then
- ${echo} "x - SKIPPING t1/agwb/top_const.py (file already exists)"
- else
- ${echo} "x - extracting t1/agwb/top_const.py (text)"
- sed 's/^X//' << 'SHAR_EOF' > 't1/agwb/top_const.py' &&
- C_TYPE_ID=1111
- SHAR_EOF
- (set 20 21 06 28 00 38 30 't1/agwb/top_const.py'
- eval "${shar_touch}") && \
- chmod 0644 't1/agwb/top_const.py'
- if test $? -ne 0
- then ${echo} "restore of t1/agwb/top_const.py failed"
- fi
- if ${md5check}
- then (
- ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 't1/agwb/top_const.py': 'MD5 check failed'
- ) << \SHAR_EOF
- 0ab74f53f6cd78d10d350d28ac06ecd8 t1/agwb/top_const.py
- SHAR_EOF
- else
- test `LC_ALL=C wc -c < 't1/agwb/top_const.py'` -ne 15 && \
- ${echo} "restoration warning: size of 't1/agwb/top_const.py' is not 15"
- fi
- fi
- # ============= t1/agwb/__init__.py ==============
- if test -n "${keep_file}" && test -f 't1/agwb/__init__.py'
- then
- ${echo} "x - SKIPPING t1/agwb/__init__.py (file already exists)"
- else
- ${echo} "x - extracting t1/agwb/__init__.py (text)"
- sed 's/^X//' << 'SHAR_EOF' > 't1/agwb/__init__.py' &&
- from .agwb import *
- from .top_const import *
- from .top_v0 import top as top_v0
- SHAR_EOF
- (set 20 21 06 28 00 46 37 't1/agwb/__init__.py'
- eval "${shar_touch}") && \
- chmod 0644 't1/agwb/__init__.py'
- if test $? -ne 0
- then ${echo} "restore of t1/agwb/__init__.py failed"
- fi
- if ${md5check}
- then (
- ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 't1/agwb/__init__.py': 'MD5 check failed'
- ) << \SHAR_EOF
- ce4aeea94e7d02e4175bee763e16f351 t1/agwb/__init__.py
- SHAR_EOF
- else
- test `LC_ALL=C wc -c < 't1/agwb/__init__.py'` -ne 79 && \
- ${echo} "restoration warning: size of 't1/agwb/__init__.py' is not 79"
- fi
- fi
- # ============= t1/agwb/top_v0.py ==============
- if test -n "${keep_file}" && test -f 't1/agwb/top_v0.py'
- then
- ${echo} "x - SKIPPING t1/agwb/top_v0.py (file already exists)"
- else
- ${echo} "x - extracting t1/agwb/top_v0.py (text)"
- sed 's/^X//' << 'SHAR_EOF' > 't1/agwb/top_v0.py' &&
- from . import agwb
- from .top_const import *
- X
- class top():
- X def __init__(self):
- X self.rr = agwb.desc
- X def show(self):
- X print("object from t1, desc=",self.rr)
- X print("type ID=",C_TYPE_ID)
- SHAR_EOF
- (set 20 21 06 28 00 54 18 't1/agwb/top_v0.py'
- eval "${shar_touch}") && \
- chmod 0644 't1/agwb/top_v0.py'
- if test $? -ne 0
- then ${echo} "restore of t1/agwb/top_v0.py failed"
- fi
- if ${md5check}
- then (
- ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 't1/agwb/top_v0.py': 'MD5 check failed'
- ) << \SHAR_EOF
- 87d0a95a860020fdfddee13d383b8149 t1/agwb/top_v0.py
- SHAR_EOF
- else
- test `LC_ALL=C wc -c < 't1/agwb/top_v0.py'` -ne 210 && \
- ${echo} "restoration warning: size of 't1/agwb/top_v0.py' is not 210"
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement