Advertisement
Guest User

Multiple versions of the Python module with the same name - symlink based approach

a guest
Jun 28th, 2021
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 17.83 KB | None | 0 0
  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=_sh15625
  7. # Made on 2021-06-28 21:33 CEST by <wzab@wzab>.
  8. # Source directory was '/tmp/demo'.
  9. #
  10. # Existing files will *not* be overwritten, unless '-c' is specified.
  11. #
  12. # This shar contains:
  13. # length mode       name
  14. # ------ ---------- ------------------------------------------
  15. #     40 -rw-r--r-- xt1/very/long/path/agwb/agwb.py
  16. #     15 -rw-r--r-- xt1/very/long/path/agwb/top_const.py
  17. #     79 -rw-r--r-- xt1/very/long/path/agwb/__init__.py
  18. #    210 -rw-r--r-- xt1/very/long/path/agwb/top_v0.py
  19. #   1383 -rw-r--r-- load_demo.py
  20. #     40 -rw-r--r-- xt2/completely/different/path/agwb/agwb.py
  21. #     15 -rw-r--r-- xt2/completely/different/path/agwb/top_const.py
  22. #     79 -rw-r--r-- xt2/completely/different/path/agwb/__init__.py
  23. #    209 -rw-r--r-- xt2/completely/different/path/agwb/top_v0.py
  24. #
  25. MD5SUM=${MD5SUM-md5sum}
  26. f=`${MD5SUM} --version | egrep '^md5sum .*(core|text)utils'`
  27. test -n "${f}" && md5check=true || md5check=false
  28. ${md5check} || \
  29.   echo 'Note: not verifying md5sums.  Consider installing GNU coreutils.'
  30. if test "X$1" = "X-c"
  31. then keep_file=''
  32. else keep_file=true
  33. fi
  34. echo=echo
  35. save_IFS="${IFS}"
  36. IFS="${IFS}:"
  37. gettext_dir=
  38. locale_dir=
  39. set_echo=false
  40.  
  41. for dir in $PATH
  42. do
  43.   if test -f $dir/gettext \
  44.      && ($dir/gettext --version >/dev/null 2>&1)
  45.   then
  46.     case `$dir/gettext --version 2>&1 | sed 1q` in
  47.       *GNU*) gettext_dir=$dir
  48.       set_echo=true
  49.       break ;;
  50.     esac
  51.   fi
  52. done
  53.  
  54. if ${set_echo}
  55. then
  56.   set_echo=false
  57.   for dir in $PATH
  58.   do
  59.     if test -f $dir/shar \
  60.        && ($dir/shar --print-text-domain-dir >/dev/null 2>&1)
  61.     then
  62.       locale_dir=`$dir/shar --print-text-domain-dir`
  63.       set_echo=true
  64.       break
  65.     fi
  66.   done
  67.  
  68.   if ${set_echo}
  69.   then
  70.     TEXTDOMAINDIR=$locale_dir
  71.     export TEXTDOMAINDIR
  72.     TEXTDOMAIN=sharutils
  73.     export TEXTDOMAIN
  74.     echo="$gettext_dir/gettext -s"
  75.   fi
  76. fi
  77. IFS="$save_IFS"
  78. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null
  79. then if (echo -n test; echo 1,2,3) | grep n >/dev/null
  80.      then shar_n= shar_c='
  81. '
  82.      else shar_n=-n shar_c= ; fi
  83. else shar_n= shar_c='\c' ; fi
  84. f=shar-touch.$$
  85. st1=200112312359.59
  86. st2=123123592001.59
  87. st2tr=123123592001.5 # old SysV 14-char limit
  88. st3=1231235901
  89.  
  90. if   touch -am -t ${st1} ${f} >/dev/null 2>&1 && \
  91.      test ! -f ${st1} && test -f ${f}; then
  92.   shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"'
  93.  
  94. elif touch -am ${st2} ${f} >/dev/null 2>&1 && \
  95.      test ! -f ${st2} && test ! -f ${st2tr} && test -f ${f}; then
  96.   shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"'
  97.  
  98. elif touch -am ${st3} ${f} >/dev/null 2>&1 && \
  99.      test ! -f ${st3} && test -f ${f}; then
  100.   shar_touch='touch -am $3$4$5$6$2 "$8"'
  101.  
  102. else
  103.   shar_touch=:
  104.   echo
  105.   ${echo} 'WARNING: not restoring timestamps.  Consider getting and
  106. installing GNU '\''touch'\'', distributed in GNU coreutils...'
  107.   echo
  108. fi
  109. rm -f ${st1} ${st2} ${st2tr} ${st3} ${f}
  110. #
  111. if test ! -d ${lock_dir} ; then :
  112. else ${echo} "lock directory ${lock_dir} exists"
  113.      exit 1
  114. fi
  115. if mkdir ${lock_dir}
  116. then ${echo} "x - created lock directory ${lock_dir}."
  117. else ${echo} "x - failed to create lock directory ${lock_dir}."
  118.      exit 1
  119. fi
  120. # ============= xt1/very/long/path/agwb/agwb.py ==============
  121. if test ! -d 'xt1'; then
  122.   mkdir 'xt1'
  123. if test $? -eq 0
  124. then ${echo} "x - created directory xt1."
  125. else ${echo} "x - failed to create directory xt1."
  126.      exit 1
  127. fi
  128. fi
  129. if test ! -d 'xt1/very'; then
  130.   mkdir 'xt1/very'
  131. if test $? -eq 0
  132. then ${echo} "x - created directory xt1/very."
  133. else ${echo} "x - failed to create directory xt1/very."
  134.      exit 1
  135. fi
  136. fi
  137. if test ! -d 'xt1/very/long'; then
  138.   mkdir 'xt1/very/long'
  139. if test $? -eq 0
  140. then ${echo} "x - created directory xt1/very/long."
  141. else ${echo} "x - failed to create directory xt1/very/long."
  142.      exit 1
  143. fi
  144. fi
  145. if test ! -d 'xt1/very/long/path'; then
  146.   mkdir 'xt1/very/long/path'
  147. if test $? -eq 0
  148. then ${echo} "x - created directory xt1/very/long/path."
  149. else ${echo} "x - failed to create directory xt1/very/long/path."
  150.      exit 1
  151. fi
  152. fi
  153. if test ! -d 'xt1/very/long/path/agwb'; then
  154.   mkdir 'xt1/very/long/path/agwb'
  155. if test $? -eq 0
  156. then ${echo} "x - created directory xt1/very/long/path/agwb."
  157. else ${echo} "x - failed to create directory xt1/very/long/path/agwb."
  158.      exit 1
  159. fi
  160. fi
  161. if test -n "${keep_file}" && test -f 'xt1/very/long/path/agwb/agwb.py'
  162. then
  163. ${echo} "x - SKIPPING xt1/very/long/path/agwb/agwb.py (file already exists)"
  164.  
  165. else
  166. ${echo} "x - extracting xt1/very/long/path/agwb/agwb.py (text)"
  167.   sed 's/^X//' << 'SHAR_EOF' > 'xt1/very/long/path/agwb/agwb.py' &&
  168. desc="That's version from directory t1"
  169. SHAR_EOF
  170.   (set 20 21 06 28 00 37 53 'xt1/very/long/path/agwb/agwb.py'
  171.    eval "${shar_touch}") && \
  172.   chmod 0644 'xt1/very/long/path/agwb/agwb.py'
  173. if test $? -ne 0
  174. then ${echo} "restore of xt1/very/long/path/agwb/agwb.py failed"
  175. fi
  176.   if ${md5check}
  177.   then (
  178.        ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'xt1/very/long/path/agwb/agwb.py': 'MD5 check failed'
  179.        ) << \SHAR_EOF
  180. 034b71c5fe1062ac88a80783dbcd9169  xt1/very/long/path/agwb/agwb.py
  181. SHAR_EOF
  182.  
  183. else
  184. test `LC_ALL=C wc -c < 'xt1/very/long/path/agwb/agwb.py'` -ne 40 && \
  185.   ${echo} "restoration warning:  size of 'xt1/very/long/path/agwb/agwb.py' is not 40"
  186.   fi
  187. fi
  188. # ============= xt1/very/long/path/agwb/top_const.py ==============
  189. if test ! -d 'xt1/very/long/path/agwb'; then
  190.   mkdir 'xt1/very/long/path/agwb'
  191. if test $? -eq 0
  192. then ${echo} "x - created directory xt1/very/long/path/agwb."
  193. else ${echo} "x - failed to create directory xt1/very/long/path/agwb."
  194.      exit 1
  195. fi
  196. fi
  197. if test -n "${keep_file}" && test -f 'xt1/very/long/path/agwb/top_const.py'
  198. then
  199. ${echo} "x - SKIPPING xt1/very/long/path/agwb/top_const.py (file already exists)"
  200.  
  201. else
  202. ${echo} "x - extracting xt1/very/long/path/agwb/top_const.py (text)"
  203.   sed 's/^X//' << 'SHAR_EOF' > 'xt1/very/long/path/agwb/top_const.py' &&
  204. C_TYPE_ID=1111
  205. SHAR_EOF
  206.   (set 20 21 06 28 00 38 30 'xt1/very/long/path/agwb/top_const.py'
  207.    eval "${shar_touch}") && \
  208.   chmod 0644 'xt1/very/long/path/agwb/top_const.py'
  209. if test $? -ne 0
  210. then ${echo} "restore of xt1/very/long/path/agwb/top_const.py failed"
  211. fi
  212.   if ${md5check}
  213.   then (
  214.        ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'xt1/very/long/path/agwb/top_const.py': 'MD5 check failed'
  215.        ) << \SHAR_EOF
  216. 0ab74f53f6cd78d10d350d28ac06ecd8  xt1/very/long/path/agwb/top_const.py
  217. SHAR_EOF
  218.  
  219. else
  220. test `LC_ALL=C wc -c < 'xt1/very/long/path/agwb/top_const.py'` -ne 15 && \
  221.   ${echo} "restoration warning:  size of 'xt1/very/long/path/agwb/top_const.py' is not 15"
  222.   fi
  223. fi
  224. # ============= xt1/very/long/path/agwb/__init__.py ==============
  225. if test -n "${keep_file}" && test -f 'xt1/very/long/path/agwb/__init__.py'
  226. then
  227. ${echo} "x - SKIPPING xt1/very/long/path/agwb/__init__.py (file already exists)"
  228.  
  229. else
  230. ${echo} "x - extracting xt1/very/long/path/agwb/__init__.py (text)"
  231.   sed 's/^X//' << 'SHAR_EOF' > 'xt1/very/long/path/agwb/__init__.py' &&
  232. from .agwb import *
  233. from .top_const import *
  234. from .top_v0 import top as top_v0
  235. SHAR_EOF
  236.   (set 20 21 06 28 00 46 37 'xt1/very/long/path/agwb/__init__.py'
  237.    eval "${shar_touch}") && \
  238.   chmod 0644 'xt1/very/long/path/agwb/__init__.py'
  239. if test $? -ne 0
  240. then ${echo} "restore of xt1/very/long/path/agwb/__init__.py failed"
  241. fi
  242.   if ${md5check}
  243.   then (
  244.        ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'xt1/very/long/path/agwb/__init__.py': 'MD5 check failed'
  245.        ) << \SHAR_EOF
  246. ce4aeea94e7d02e4175bee763e16f351  xt1/very/long/path/agwb/__init__.py
  247. SHAR_EOF
  248.  
  249. else
  250. test `LC_ALL=C wc -c < 'xt1/very/long/path/agwb/__init__.py'` -ne 79 && \
  251.   ${echo} "restoration warning:  size of 'xt1/very/long/path/agwb/__init__.py' is not 79"
  252.   fi
  253. fi
  254. # ============= xt1/very/long/path/agwb/top_v0.py ==============
  255. if test -n "${keep_file}" && test -f 'xt1/very/long/path/agwb/top_v0.py'
  256. then
  257. ${echo} "x - SKIPPING xt1/very/long/path/agwb/top_v0.py (file already exists)"
  258.  
  259. else
  260. ${echo} "x - extracting xt1/very/long/path/agwb/top_v0.py (text)"
  261.   sed 's/^X//' << 'SHAR_EOF' > 'xt1/very/long/path/agwb/top_v0.py' &&
  262. from . import agwb
  263. from .top_const import *
  264. X
  265. class top():
  266. X    def __init__(self):
  267. X       self.rr = agwb.desc
  268. X    def show(self):
  269. X       print("object from t1, desc=",self.rr)
  270. X       print("type ID=",C_TYPE_ID)
  271. SHAR_EOF
  272.   (set 20 21 06 28 00 54 18 'xt1/very/long/path/agwb/top_v0.py'
  273.    eval "${shar_touch}") && \
  274.   chmod 0644 'xt1/very/long/path/agwb/top_v0.py'
  275. if test $? -ne 0
  276. then ${echo} "restore of xt1/very/long/path/agwb/top_v0.py failed"
  277. fi
  278.   if ${md5check}
  279.   then (
  280.        ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'xt1/very/long/path/agwb/top_v0.py': 'MD5 check failed'
  281.        ) << \SHAR_EOF
  282. 87d0a95a860020fdfddee13d383b8149  xt1/very/long/path/agwb/top_v0.py
  283. SHAR_EOF
  284.  
  285. else
  286. test `LC_ALL=C wc -c < 'xt1/very/long/path/agwb/top_v0.py'` -ne 210 && \
  287.   ${echo} "restoration warning:  size of 'xt1/very/long/path/agwb/top_v0.py' is not 210"
  288.   fi
  289. fi
  290. # ============= load_demo.py ==============
  291. if test -n "${keep_file}" && test -f 'load_demo.py'
  292. then
  293. ${echo} "x - SKIPPING load_demo.py (file already exists)"
  294.  
  295. else
  296. ${echo} "x - extracting load_demo.py (text)"
  297.   sed 's/^X//' << 'SHAR_EOF' > 'load_demo.py' &&
  298. import sys
  299. import os
  300. import importlib
  301. import tempfile
  302. X
  303. # Directory with description of the first board
  304. dir1 = './xt1/very/long/path'
  305. # Directory with description of the second board
  306. dir2 = './xt2/completely/different/path'
  307. X
  308. # Name of the top entity in the design
  309. top = 'top_v0'
  310. X
  311. # Create a temporary directory
  312. tmpdir = tempfile.TemporaryDirectory()
  313. X
  314. # Add it to the Python path
  315. sys.path.insert(0,tmpdir.name)
  316. X
  317. # Create symlinks to the directories with descriptions of the boards
  318. os.symlink(os.path.abspath(dir1),tmpdir.name+"/t1")
  319. os.symlink(os.path.abspath(dir2),tmpdir.name+"/t2")
  320. X
  321. # Import description of the first board as agwb
  322. import t1.agwb as agwb
  323. X
  324. # use the imported agwb
  325. at1 = getattr(agwb,top)()
  326. # if the name of the top entity is constant, you can do it easier
  327. bt1 = agwb.top_v0()
  328. X
  329. # Import description of the second board as agwb
  330. import t2.agwb as agwb
  331. X
  332. # use the imported agwb
  333. at2 = getattr(agwb,top)()
  334. # if the name of the top entity is constant, you can do it easier
  335. bt2 = agwb.top_v0()
  336. X
  337. # Now we can remove the temporary directory from the python path
  338. sys.path.remove(tmpdir.name)
  339. # We can even delete it (otherwise it will be deleted when Python session ends)
  340. tmpdir.cleanup()
  341. X
  342. # Check if both versions are loaded and available
  343. print("Call at1.show")
  344. at1.show()
  345. print("Call at2.show")
  346. at2.show()
  347. X
  348. print("Call bt1.show")
  349. bt1.show()
  350. print("Call bt2.show")
  351. bt2.show()
  352. X
  353. SHAR_EOF
  354.   (set 20 21 06 28 21 29 22 'load_demo.py'
  355.    eval "${shar_touch}") && \
  356.   chmod 0644 'load_demo.py'
  357. if test $? -ne 0
  358. then ${echo} "restore of load_demo.py failed"
  359. fi
  360.   if ${md5check}
  361.   then (
  362.        ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'load_demo.py': 'MD5 check failed'
  363.        ) << \SHAR_EOF
  364. 41e758c40c9c3b6ab902b130523e21f7  load_demo.py
  365. SHAR_EOF
  366.  
  367. else
  368. test `LC_ALL=C wc -c < 'load_demo.py'` -ne 1383 && \
  369.   ${echo} "restoration warning:  size of 'load_demo.py' is not 1383"
  370.   fi
  371. fi
  372. # ============= xt2/completely/different/path/agwb/agwb.py ==============
  373. if test ! -d 'xt2'; then
  374.   mkdir 'xt2'
  375. if test $? -eq 0
  376. then ${echo} "x - created directory xt2."
  377. else ${echo} "x - failed to create directory xt2."
  378.      exit 1
  379. fi
  380. fi
  381. if test ! -d 'xt2/completely'; then
  382.   mkdir 'xt2/completely'
  383. if test $? -eq 0
  384. then ${echo} "x - created directory xt2/completely."
  385. else ${echo} "x - failed to create directory xt2/completely."
  386.      exit 1
  387. fi
  388. fi
  389. if test ! -d 'xt2/completely/different'; then
  390.   mkdir 'xt2/completely/different'
  391. if test $? -eq 0
  392. then ${echo} "x - created directory xt2/completely/different."
  393. else ${echo} "x - failed to create directory xt2/completely/different."
  394.      exit 1
  395. fi
  396. fi
  397. if test ! -d 'xt2/completely/different/path'; then
  398.   mkdir 'xt2/completely/different/path'
  399. if test $? -eq 0
  400. then ${echo} "x - created directory xt2/completely/different/path."
  401. else ${echo} "x - failed to create directory xt2/completely/different/path."
  402.      exit 1
  403. fi
  404. fi
  405. if test ! -d 'xt2/completely/different/path/agwb'; then
  406.   mkdir 'xt2/completely/different/path/agwb'
  407. if test $? -eq 0
  408. then ${echo} "x - created directory xt2/completely/different/path/agwb."
  409. else ${echo} "x - failed to create directory xt2/completely/different/path/agwb."
  410.      exit 1
  411. fi
  412. fi
  413. if test -n "${keep_file}" && test -f 'xt2/completely/different/path/agwb/agwb.py'
  414. then
  415. ${echo} "x - SKIPPING xt2/completely/different/path/agwb/agwb.py (file already exists)"
  416.  
  417. else
  418. ${echo} "x - extracting xt2/completely/different/path/agwb/agwb.py (text)"
  419.   sed 's/^X//' << 'SHAR_EOF' > 'xt2/completely/different/path/agwb/agwb.py' &&
  420. desc="That's version from directory t2"
  421. SHAR_EOF
  422.   (set 20 21 06 28 00 42 33 'xt2/completely/different/path/agwb/agwb.py'
  423.    eval "${shar_touch}") && \
  424.   chmod 0644 'xt2/completely/different/path/agwb/agwb.py'
  425. if test $? -ne 0
  426. then ${echo} "restore of xt2/completely/different/path/agwb/agwb.py failed"
  427. fi
  428.   if ${md5check}
  429.   then (
  430.        ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'xt2/completely/different/path/agwb/agwb.py': 'MD5 check failed'
  431.        ) << \SHAR_EOF
  432. 4a1737fdf0a063cb6a40e763fd85245a  xt2/completely/different/path/agwb/agwb.py
  433. SHAR_EOF
  434.  
  435. else
  436. test `LC_ALL=C wc -c < 'xt2/completely/different/path/agwb/agwb.py'` -ne 40 && \
  437.   ${echo} "restoration warning:  size of 'xt2/completely/different/path/agwb/agwb.py' is not 40"
  438.   fi
  439. fi
  440. # ============= xt2/completely/different/path/agwb/top_const.py ==============
  441. if test ! -d 'xt2/completely/different/path/agwb'; then
  442.   mkdir 'xt2/completely/different/path/agwb'
  443. if test $? -eq 0
  444. then ${echo} "x - created directory xt2/completely/different/path/agwb."
  445. else ${echo} "x - failed to create directory xt2/completely/different/path/agwb."
  446.      exit 1
  447. fi
  448. fi
  449. if test -n "${keep_file}" && test -f 'xt2/completely/different/path/agwb/top_const.py'
  450. then
  451. ${echo} "x - SKIPPING xt2/completely/different/path/agwb/top_const.py (file already exists)"
  452.  
  453. else
  454. ${echo} "x - extracting xt2/completely/different/path/agwb/top_const.py (text)"
  455.   sed 's/^X//' << 'SHAR_EOF' > 'xt2/completely/different/path/agwb/top_const.py' &&
  456. C_TYPE_ID=2222
  457. SHAR_EOF
  458.   (set 20 21 06 28 00 42 40 'xt2/completely/different/path/agwb/top_const.py'
  459.    eval "${shar_touch}") && \
  460.   chmod 0644 'xt2/completely/different/path/agwb/top_const.py'
  461. if test $? -ne 0
  462. then ${echo} "restore of xt2/completely/different/path/agwb/top_const.py failed"
  463. fi
  464.   if ${md5check}
  465.   then (
  466.        ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'xt2/completely/different/path/agwb/top_const.py': 'MD5 check failed'
  467.        ) << \SHAR_EOF
  468. e32dd05b8c4a7f38d1a0f48d0473073c  xt2/completely/different/path/agwb/top_const.py
  469. SHAR_EOF
  470.  
  471. else
  472. test `LC_ALL=C wc -c < 'xt2/completely/different/path/agwb/top_const.py'` -ne 15 && \
  473.   ${echo} "restoration warning:  size of 'xt2/completely/different/path/agwb/top_const.py' is not 15"
  474.   fi
  475. fi
  476. # ============= xt2/completely/different/path/agwb/__init__.py ==============
  477. if test -n "${keep_file}" && test -f 'xt2/completely/different/path/agwb/__init__.py'
  478. then
  479. ${echo} "x - SKIPPING xt2/completely/different/path/agwb/__init__.py (file already exists)"
  480.  
  481. else
  482. ${echo} "x - extracting xt2/completely/different/path/agwb/__init__.py (text)"
  483.   sed 's/^X//' << 'SHAR_EOF' > 'xt2/completely/different/path/agwb/__init__.py' &&
  484. from .agwb import *
  485. from .top_const import *
  486. from .top_v0 import top as top_v0
  487. SHAR_EOF
  488.   (set 20 21 06 28 00 46 48 'xt2/completely/different/path/agwb/__init__.py'
  489.    eval "${shar_touch}") && \
  490.   chmod 0644 'xt2/completely/different/path/agwb/__init__.py'
  491. if test $? -ne 0
  492. then ${echo} "restore of xt2/completely/different/path/agwb/__init__.py failed"
  493. fi
  494.   if ${md5check}
  495.   then (
  496.        ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'xt2/completely/different/path/agwb/__init__.py': 'MD5 check failed'
  497.        ) << \SHAR_EOF
  498. ce4aeea94e7d02e4175bee763e16f351  xt2/completely/different/path/agwb/__init__.py
  499. SHAR_EOF
  500.  
  501. else
  502. test `LC_ALL=C wc -c < 'xt2/completely/different/path/agwb/__init__.py'` -ne 79 && \
  503.   ${echo} "restoration warning:  size of 'xt2/completely/different/path/agwb/__init__.py' is not 79"
  504.   fi
  505. fi
  506. # ============= xt2/completely/different/path/agwb/top_v0.py ==============
  507. if test -n "${keep_file}" && test -f 'xt2/completely/different/path/agwb/top_v0.py'
  508. then
  509. ${echo} "x - SKIPPING xt2/completely/different/path/agwb/top_v0.py (file already exists)"
  510.  
  511. else
  512. ${echo} "x - extracting xt2/completely/different/path/agwb/top_v0.py (text)"
  513.   sed 's/^X//' << 'SHAR_EOF' > 'xt2/completely/different/path/agwb/top_v0.py' &&
  514. from . import agwb
  515. from .top_const import *
  516. class top():
  517. X    def __init__(self):
  518. X       self.rr = agwb.desc
  519. X    def show(self):
  520. X       print("object from t2, desc=",self.rr)
  521. X       print("type ID=",C_TYPE_ID)
  522. SHAR_EOF
  523.   (set 20 21 06 28 00 53 12 'xt2/completely/different/path/agwb/top_v0.py'
  524.    eval "${shar_touch}") && \
  525.   chmod 0644 'xt2/completely/different/path/agwb/top_v0.py'
  526. if test $? -ne 0
  527. then ${echo} "restore of xt2/completely/different/path/agwb/top_v0.py failed"
  528. fi
  529.   if ${md5check}
  530.   then (
  531.        ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'xt2/completely/different/path/agwb/top_v0.py': 'MD5 check failed'
  532.        ) << \SHAR_EOF
  533. a9df0ac7641bcbd58ff0bbf61f560e16  xt2/completely/different/path/agwb/top_v0.py
  534. SHAR_EOF
  535.  
  536. else
  537. test `LC_ALL=C wc -c < 'xt2/completely/different/path/agwb/top_v0.py'` -ne 209 && \
  538.   ${echo} "restoration warning:  size of 'xt2/completely/different/path/agwb/top_v0.py' is not 209"
  539.   fi
  540. fi
  541. if rm -fr ${lock_dir}
  542. then ${echo} "x - removed lock directory ${lock_dir}."
  543. else ${echo} "x - failed to remove lock directory ${lock_dir}."
  544.      exit 1
  545. fi
  546. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement