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=_sh15625
- # Made on 2021-06-28 21:33 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
- # ------ ---------- ------------------------------------------
- # 40 -rw-r--r-- xt1/very/long/path/agwb/agwb.py
- # 15 -rw-r--r-- xt1/very/long/path/agwb/top_const.py
- # 79 -rw-r--r-- xt1/very/long/path/agwb/__init__.py
- # 210 -rw-r--r-- xt1/very/long/path/agwb/top_v0.py
- # 1383 -rw-r--r-- load_demo.py
- # 40 -rw-r--r-- xt2/completely/different/path/agwb/agwb.py
- # 15 -rw-r--r-- xt2/completely/different/path/agwb/top_const.py
- # 79 -rw-r--r-- xt2/completely/different/path/agwb/__init__.py
- # 209 -rw-r--r-- xt2/completely/different/path/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
- # ============= xt1/very/long/path/agwb/agwb.py ==============
- if test ! -d 'xt1'; then
- mkdir 'xt1'
- if test $? -eq 0
- then ${echo} "x - created directory xt1."
- else ${echo} "x - failed to create directory xt1."
- exit 1
- fi
- fi
- if test ! -d 'xt1/very'; then
- mkdir 'xt1/very'
- if test $? -eq 0
- then ${echo} "x - created directory xt1/very."
- else ${echo} "x - failed to create directory xt1/very."
- exit 1
- fi
- fi
- if test ! -d 'xt1/very/long'; then
- mkdir 'xt1/very/long'
- if test $? -eq 0
- then ${echo} "x - created directory xt1/very/long."
- else ${echo} "x - failed to create directory xt1/very/long."
- exit 1
- fi
- fi
- if test ! -d 'xt1/very/long/path'; then
- mkdir 'xt1/very/long/path'
- if test $? -eq 0
- then ${echo} "x - created directory xt1/very/long/path."
- else ${echo} "x - failed to create directory xt1/very/long/path."
- exit 1
- fi
- fi
- if test ! -d 'xt1/very/long/path/agwb'; then
- mkdir 'xt1/very/long/path/agwb'
- if test $? -eq 0
- then ${echo} "x - created directory xt1/very/long/path/agwb."
- else ${echo} "x - failed to create directory xt1/very/long/path/agwb."
- exit 1
- fi
- fi
- if test -n "${keep_file}" && test -f 'xt1/very/long/path/agwb/agwb.py'
- then
- ${echo} "x - SKIPPING xt1/very/long/path/agwb/agwb.py (file already exists)"
- else
- ${echo} "x - extracting xt1/very/long/path/agwb/agwb.py (text)"
- sed 's/^X//' << 'SHAR_EOF' > 'xt1/very/long/path/agwb/agwb.py' &&
- desc="That's version from directory t1"
- SHAR_EOF
- (set 20 21 06 28 00 37 53 'xt1/very/long/path/agwb/agwb.py'
- eval "${shar_touch}") && \
- chmod 0644 'xt1/very/long/path/agwb/agwb.py'
- if test $? -ne 0
- then ${echo} "restore of xt1/very/long/path/agwb/agwb.py failed"
- fi
- if ${md5check}
- then (
- ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'xt1/very/long/path/agwb/agwb.py': 'MD5 check failed'
- ) << \SHAR_EOF
- 034b71c5fe1062ac88a80783dbcd9169 xt1/very/long/path/agwb/agwb.py
- SHAR_EOF
- else
- test `LC_ALL=C wc -c < 'xt1/very/long/path/agwb/agwb.py'` -ne 40 && \
- ${echo} "restoration warning: size of 'xt1/very/long/path/agwb/agwb.py' is not 40"
- fi
- fi
- # ============= xt1/very/long/path/agwb/top_const.py ==============
- if test ! -d 'xt1/very/long/path/agwb'; then
- mkdir 'xt1/very/long/path/agwb'
- if test $? -eq 0
- then ${echo} "x - created directory xt1/very/long/path/agwb."
- else ${echo} "x - failed to create directory xt1/very/long/path/agwb."
- exit 1
- fi
- fi
- if test -n "${keep_file}" && test -f 'xt1/very/long/path/agwb/top_const.py'
- then
- ${echo} "x - SKIPPING xt1/very/long/path/agwb/top_const.py (file already exists)"
- else
- ${echo} "x - extracting xt1/very/long/path/agwb/top_const.py (text)"
- sed 's/^X//' << 'SHAR_EOF' > 'xt1/very/long/path/agwb/top_const.py' &&
- C_TYPE_ID=1111
- SHAR_EOF
- (set 20 21 06 28 00 38 30 'xt1/very/long/path/agwb/top_const.py'
- eval "${shar_touch}") && \
- chmod 0644 'xt1/very/long/path/agwb/top_const.py'
- if test $? -ne 0
- then ${echo} "restore of xt1/very/long/path/agwb/top_const.py failed"
- fi
- if ${md5check}
- then (
- ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'xt1/very/long/path/agwb/top_const.py': 'MD5 check failed'
- ) << \SHAR_EOF
- 0ab74f53f6cd78d10d350d28ac06ecd8 xt1/very/long/path/agwb/top_const.py
- SHAR_EOF
- else
- test `LC_ALL=C wc -c < 'xt1/very/long/path/agwb/top_const.py'` -ne 15 && \
- ${echo} "restoration warning: size of 'xt1/very/long/path/agwb/top_const.py' is not 15"
- fi
- fi
- # ============= xt1/very/long/path/agwb/__init__.py ==============
- if test -n "${keep_file}" && test -f 'xt1/very/long/path/agwb/__init__.py'
- then
- ${echo} "x - SKIPPING xt1/very/long/path/agwb/__init__.py (file already exists)"
- else
- ${echo} "x - extracting xt1/very/long/path/agwb/__init__.py (text)"
- sed 's/^X//' << 'SHAR_EOF' > 'xt1/very/long/path/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 'xt1/very/long/path/agwb/__init__.py'
- eval "${shar_touch}") && \
- chmod 0644 'xt1/very/long/path/agwb/__init__.py'
- if test $? -ne 0
- then ${echo} "restore of xt1/very/long/path/agwb/__init__.py failed"
- fi
- if ${md5check}
- then (
- ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'xt1/very/long/path/agwb/__init__.py': 'MD5 check failed'
- ) << \SHAR_EOF
- ce4aeea94e7d02e4175bee763e16f351 xt1/very/long/path/agwb/__init__.py
- SHAR_EOF
- else
- test `LC_ALL=C wc -c < 'xt1/very/long/path/agwb/__init__.py'` -ne 79 && \
- ${echo} "restoration warning: size of 'xt1/very/long/path/agwb/__init__.py' is not 79"
- fi
- fi
- # ============= xt1/very/long/path/agwb/top_v0.py ==============
- if test -n "${keep_file}" && test -f 'xt1/very/long/path/agwb/top_v0.py'
- then
- ${echo} "x - SKIPPING xt1/very/long/path/agwb/top_v0.py (file already exists)"
- else
- ${echo} "x - extracting xt1/very/long/path/agwb/top_v0.py (text)"
- sed 's/^X//' << 'SHAR_EOF' > 'xt1/very/long/path/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 'xt1/very/long/path/agwb/top_v0.py'
- eval "${shar_touch}") && \
- chmod 0644 'xt1/very/long/path/agwb/top_v0.py'
- if test $? -ne 0
- then ${echo} "restore of xt1/very/long/path/agwb/top_v0.py failed"
- fi
- if ${md5check}
- then (
- ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'xt1/very/long/path/agwb/top_v0.py': 'MD5 check failed'
- ) << \SHAR_EOF
- 87d0a95a860020fdfddee13d383b8149 xt1/very/long/path/agwb/top_v0.py
- SHAR_EOF
- else
- test `LC_ALL=C wc -c < 'xt1/very/long/path/agwb/top_v0.py'` -ne 210 && \
- ${echo} "restoration warning: size of 'xt1/very/long/path/agwb/top_v0.py' is not 210"
- fi
- 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 os
- import importlib
- import tempfile
- X
- # Directory with description of the first board
- dir1 = './xt1/very/long/path'
- # Directory with description of the second board
- dir2 = './xt2/completely/different/path'
- X
- # Name of the top entity in the design
- top = 'top_v0'
- X
- # Create a temporary directory
- tmpdir = tempfile.TemporaryDirectory()
- X
- # Add it to the Python path
- sys.path.insert(0,tmpdir.name)
- X
- # Create symlinks to the directories with descriptions of the boards
- os.symlink(os.path.abspath(dir1),tmpdir.name+"/t1")
- os.symlink(os.path.abspath(dir2),tmpdir.name+"/t2")
- X
- # Import description of the first board as agwb
- import t1.agwb as agwb
- X
- # use the imported agwb
- at1 = getattr(agwb,top)()
- # if the name of the top entity is constant, you can do it easier
- bt1 = agwb.top_v0()
- X
- # Import description of the second board as agwb
- import t2.agwb as agwb
- X
- # use the imported agwb
- at2 = getattr(agwb,top)()
- # if the name of the top entity is constant, you can do it easier
- bt2 = agwb.top_v0()
- X
- # Now we can remove the temporary directory from the python path
- sys.path.remove(tmpdir.name)
- # We can even delete it (otherwise it will be deleted when Python session ends)
- tmpdir.cleanup()
- X
- # Check if both versions are loaded and available
- print("Call at1.show")
- at1.show()
- print("Call at2.show")
- at2.show()
- X
- print("Call bt1.show")
- bt1.show()
- print("Call bt2.show")
- bt2.show()
- X
- SHAR_EOF
- (set 20 21 06 28 21 29 22 '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
- 41e758c40c9c3b6ab902b130523e21f7 load_demo.py
- SHAR_EOF
- else
- test `LC_ALL=C wc -c < 'load_demo.py'` -ne 1383 && \
- ${echo} "restoration warning: size of 'load_demo.py' is not 1383"
- fi
- fi
- # ============= xt2/completely/different/path/agwb/agwb.py ==============
- if test ! -d 'xt2'; then
- mkdir 'xt2'
- if test $? -eq 0
- then ${echo} "x - created directory xt2."
- else ${echo} "x - failed to create directory xt2."
- exit 1
- fi
- fi
- if test ! -d 'xt2/completely'; then
- mkdir 'xt2/completely'
- if test $? -eq 0
- then ${echo} "x - created directory xt2/completely."
- else ${echo} "x - failed to create directory xt2/completely."
- exit 1
- fi
- fi
- if test ! -d 'xt2/completely/different'; then
- mkdir 'xt2/completely/different'
- if test $? -eq 0
- then ${echo} "x - created directory xt2/completely/different."
- else ${echo} "x - failed to create directory xt2/completely/different."
- exit 1
- fi
- fi
- if test ! -d 'xt2/completely/different/path'; then
- mkdir 'xt2/completely/different/path'
- if test $? -eq 0
- then ${echo} "x - created directory xt2/completely/different/path."
- else ${echo} "x - failed to create directory xt2/completely/different/path."
- exit 1
- fi
- fi
- if test ! -d 'xt2/completely/different/path/agwb'; then
- mkdir 'xt2/completely/different/path/agwb'
- if test $? -eq 0
- then ${echo} "x - created directory xt2/completely/different/path/agwb."
- else ${echo} "x - failed to create directory xt2/completely/different/path/agwb."
- exit 1
- fi
- fi
- if test -n "${keep_file}" && test -f 'xt2/completely/different/path/agwb/agwb.py'
- then
- ${echo} "x - SKIPPING xt2/completely/different/path/agwb/agwb.py (file already exists)"
- else
- ${echo} "x - extracting xt2/completely/different/path/agwb/agwb.py (text)"
- sed 's/^X//' << 'SHAR_EOF' > 'xt2/completely/different/path/agwb/agwb.py' &&
- desc="That's version from directory t2"
- SHAR_EOF
- (set 20 21 06 28 00 42 33 'xt2/completely/different/path/agwb/agwb.py'
- eval "${shar_touch}") && \
- chmod 0644 'xt2/completely/different/path/agwb/agwb.py'
- if test $? -ne 0
- then ${echo} "restore of xt2/completely/different/path/agwb/agwb.py failed"
- fi
- if ${md5check}
- then (
- ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'xt2/completely/different/path/agwb/agwb.py': 'MD5 check failed'
- ) << \SHAR_EOF
- 4a1737fdf0a063cb6a40e763fd85245a xt2/completely/different/path/agwb/agwb.py
- SHAR_EOF
- else
- test `LC_ALL=C wc -c < 'xt2/completely/different/path/agwb/agwb.py'` -ne 40 && \
- ${echo} "restoration warning: size of 'xt2/completely/different/path/agwb/agwb.py' is not 40"
- fi
- fi
- # ============= xt2/completely/different/path/agwb/top_const.py ==============
- if test ! -d 'xt2/completely/different/path/agwb'; then
- mkdir 'xt2/completely/different/path/agwb'
- if test $? -eq 0
- then ${echo} "x - created directory xt2/completely/different/path/agwb."
- else ${echo} "x - failed to create directory xt2/completely/different/path/agwb."
- exit 1
- fi
- fi
- if test -n "${keep_file}" && test -f 'xt2/completely/different/path/agwb/top_const.py'
- then
- ${echo} "x - SKIPPING xt2/completely/different/path/agwb/top_const.py (file already exists)"
- else
- ${echo} "x - extracting xt2/completely/different/path/agwb/top_const.py (text)"
- sed 's/^X//' << 'SHAR_EOF' > 'xt2/completely/different/path/agwb/top_const.py' &&
- C_TYPE_ID=2222
- SHAR_EOF
- (set 20 21 06 28 00 42 40 'xt2/completely/different/path/agwb/top_const.py'
- eval "${shar_touch}") && \
- chmod 0644 'xt2/completely/different/path/agwb/top_const.py'
- if test $? -ne 0
- then ${echo} "restore of xt2/completely/different/path/agwb/top_const.py failed"
- fi
- if ${md5check}
- then (
- ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'xt2/completely/different/path/agwb/top_const.py': 'MD5 check failed'
- ) << \SHAR_EOF
- e32dd05b8c4a7f38d1a0f48d0473073c xt2/completely/different/path/agwb/top_const.py
- SHAR_EOF
- else
- test `LC_ALL=C wc -c < 'xt2/completely/different/path/agwb/top_const.py'` -ne 15 && \
- ${echo} "restoration warning: size of 'xt2/completely/different/path/agwb/top_const.py' is not 15"
- fi
- fi
- # ============= xt2/completely/different/path/agwb/__init__.py ==============
- if test -n "${keep_file}" && test -f 'xt2/completely/different/path/agwb/__init__.py'
- then
- ${echo} "x - SKIPPING xt2/completely/different/path/agwb/__init__.py (file already exists)"
- else
- ${echo} "x - extracting xt2/completely/different/path/agwb/__init__.py (text)"
- sed 's/^X//' << 'SHAR_EOF' > 'xt2/completely/different/path/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 'xt2/completely/different/path/agwb/__init__.py'
- eval "${shar_touch}") && \
- chmod 0644 'xt2/completely/different/path/agwb/__init__.py'
- if test $? -ne 0
- then ${echo} "restore of xt2/completely/different/path/agwb/__init__.py failed"
- fi
- if ${md5check}
- then (
- ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'xt2/completely/different/path/agwb/__init__.py': 'MD5 check failed'
- ) << \SHAR_EOF
- ce4aeea94e7d02e4175bee763e16f351 xt2/completely/different/path/agwb/__init__.py
- SHAR_EOF
- else
- test `LC_ALL=C wc -c < 'xt2/completely/different/path/agwb/__init__.py'` -ne 79 && \
- ${echo} "restoration warning: size of 'xt2/completely/different/path/agwb/__init__.py' is not 79"
- fi
- fi
- # ============= xt2/completely/different/path/agwb/top_v0.py ==============
- if test -n "${keep_file}" && test -f 'xt2/completely/different/path/agwb/top_v0.py'
- then
- ${echo} "x - SKIPPING xt2/completely/different/path/agwb/top_v0.py (file already exists)"
- else
- ${echo} "x - extracting xt2/completely/different/path/agwb/top_v0.py (text)"
- sed 's/^X//' << 'SHAR_EOF' > 'xt2/completely/different/path/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 'xt2/completely/different/path/agwb/top_v0.py'
- eval "${shar_touch}") && \
- chmod 0644 'xt2/completely/different/path/agwb/top_v0.py'
- if test $? -ne 0
- then ${echo} "restore of xt2/completely/different/path/agwb/top_v0.py failed"
- fi
- if ${md5check}
- then (
- ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'xt2/completely/different/path/agwb/top_v0.py': 'MD5 check failed'
- ) << \SHAR_EOF
- a9df0ac7641bcbd58ff0bbf61f560e16 xt2/completely/different/path/agwb/top_v0.py
- SHAR_EOF
- else
- test `LC_ALL=C wc -c < 'xt2/completely/different/path/agwb/top_v0.py'` -ne 209 && \
- ${echo} "restoration warning: size of 'xt2/completely/different/path/agwb/top_v0.py' is not 209"
- 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