LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 605|回复: 5

这个脚本为什么不能在gentoo上运行呢?

[复制链接]
发表于 2005-2-5 07:34:44 | 显示全部楼层 |阅读模式
这是重返德军总部的安装文件,我在红旗Linux上能运行,但在gentoo上这么提示
  1. Verifying archive integrity...tail: 无法打开 ‘+6’ 来读取数据: 没有那个文件或目录
  2. Error in check sums 3086482786 3031636474
复制代码

我把前面的脚本贴出来。
  1. #! /bin/sh
  2. skip=179
  3. # This script was generated using Makeself 1.5.5
  4. CRCsum=3031636474
  5. MD5=6b2176e5726414257b6eb3374c6ae53b
  6. label="Return To Castle Wolfenstein"
  7. script=./setup.sh
  8. targetdir=wolf-setup
  9. scriptargs="1.4"
  10. keep=n
  11. TMPROOT=${TMPDIR:=/tmp}
  12. finish=true; xterm_loop=;
  13. [ x"$1" = x-xwin ] && {
  14. finish="echo Press Return to close this window...; read junk"; xterm_loop=1; shift 1;
  15. }
  16. if [ x"$1" = "x-help" -o x"$1" = "x--help" ]; then
  17.   cat << tac
  18. 1) Getting help or info about $0 :
  19.   $0 --help   Print this message
  20.   $0 --info   Print embedded info : title, default target directory, embedded script ...
  21.   $0 --lsm    Print embedded lsm entry (or no LSM)
  22.   $0 --list   Print the list of files in the archive
  23.   $0 --check  Checks integrity of the archive

  24. 2) Running $0 :
  25.   $0 [options] [additional arguments to embedded script]
  26.   with following options (in that order)
  27.   --confirm             Ask before running embedded script
  28.   --keep                Do not erase target directory after running embedded script
  29.   --target NewDirectory Extract in NewDirectory
  30. tac
  31.   exit 0;
  32. fi
  33. if [ x"$1" = "x-lsm" -o x"$1" = "x--lsm" ]; then
  34.   cat << EOF_LSM
  35. no LSM
  36. EOF_LSM
  37.   exit 0;
  38. fi
  39. if [ "$1" = "--info" ]; then
  40.         echo Identification: $label
  41.         echo Target directory: $targetdir
  42.         echo Uncompressed size: 18252 KB
  43.         echo Compression: gzip
  44.         echo Date of packaging: Tue Nov  5 15:01:42 CET 2002
  45.         echo script run after extraction: $script $scriptargs
  46.         [ x"$keep" = xy ] && echo "directory $targetdir is permanent" || echo "$targetdir will be removed after extraction"
  47.         exit 0;
  48. fi
  49. if [ "$1" = "--list" ]; then
  50.         echo Target directory: $targetdir
  51.         tail +$skip $0  | gzip -cd | tar tvf -
  52.         exit 0;
  53. fi
  54. if [ "$1" = "--check" ]; then
  55. sum1=`tail +6 $0 | cksum | sed -e 's/ /Z/' -e 's/        /Z/' | cut -dZ -f1`
  56. [ "$sum1" != "$CRCsum" ] && {
  57.   echo Error in checksums $sum1 $CRCsum
  58.   exit 2;
  59. }
  60. if [ $MD5 != "00000000000000000000000000000000" ]; then
  61. # space separated list of directories
  62.   [ x"$GUESS_MD5_PATH" = "x" ] && GUESS_MD5_PATH="/usr/local/ssl/bin /usr/local/bin /usr/bin"
  63.   MD5_PATH=""
  64.   for a in $GUESS_MD5_PATH; do
  65.     #if which $a/md5 >/dev/null 2>&1 ; then
  66.     if [ -x "$a/md5sum" ]; then
  67.        MD5_PATH=$a;
  68.     fi
  69.   done
  70.   if [ -x $MD5_PATH/md5sum ]; then
  71.     md5sum=`tail +6 $0 | $MD5_PATH/md5sum | cut -b-32`;
  72.     [ $md5sum != $MD5 ] && {
  73.       echo Error in md5 sums $md5sum $MD5
  74.       exit 2
  75.     } || { echo check sums and md5 sums are ok; exit 0; }
  76.   fi
  77.   if [ ! -x $MD5_PATH/md5sum ]; then
  78.       echo an embedded md5 sum of the archive exists but no md5 program was found in $GUESS_MD5_PATH
  79.       echo if you have md5 on your system, you should try :
  80.       echo env GUESS_MD5_PATH="FirstDirectory SecondDirectory ..." $0 -check
  81.   fi
  82. else
  83.   echo check sums are OK ; echo $0 does not contain embedded md5 sum ;
  84. fi
  85.         exit 0;
  86. fi
  87. [ x"$finish" = x ] && finish=true
  88. parsing=yes
  89. x11=y
  90. while [ x"$parsing" != x ]; do
  91.     case "$1" in
  92.       --confirm) verbose=y; shift;;
  93.       --keep) keep=y; shift;;
  94.       --nox11)  x11=n; shift;;
  95.       --target) if [ x"$2" != x ]; then targetdir="$2"; keep=y; shift 2; fi;;
  96.       *) parsing="";;
  97.     esac
  98. done
  99. if [ "$x11" = "y" ]; then
  100.     if ! tty -s; then                 # Do we have a terminal?
  101.         if [ x"$DISPLAY" != x -a x"$xterm_loop" = x ]; then  # No, but do we have X?
  102.             if xset q > /dev/null 2>&1; then # Check for valid DISPLAY variable
  103.                 GUESS_XTERMS="xterm dtterm eterm Eterm rxvt kvt konsole aterm"
  104.                 for a in $GUESS_XTERMS; do
  105.                     if which $a >/dev/null 2>&1; then
  106.                         XTERM=$a
  107.                         break
  108.                     fi
  109.                 done
  110.                 chmod a+x $0 || echo Please add execution rights on $0
  111.                 if [ `echo "$0" | cut -c1` = / ]; then # Spawn a terminal!
  112.                     exec $XTERM -title "$label" -e "$0" -xwin "$@"
  113.                 else
  114.                     exec $XTERM -title "$label" -e "./$0" -xwin "$@"
  115.                 fi
  116.             fi
  117.         fi
  118.     fi
  119. fi
  120. if [ "$keep" = y ]; then echo "Creating directory $targetdir"; tmpdir=$targetdir;
  121. else tmpdir="$TMPROOT/selfgz$$"; fi
  122. mkdir $tmpdir || {
  123.         $echo 'Cannot create target directory' $tmpdir >&2
  124.         $echo 'you should perhaps try option -target OtherDirectory' >&2
  125.                 eval $finish; exit 1;
  126. }
  127. location="`pwd`"
  128. echo=echo; [ -x /usr/ucb/echo ] && echo=/usr/ucb/echo
  129. if [ x$SETUP_NOCHECK != x1 ]; then
  130.     $echo -n Verifying archive integrity...
  131.     sum1=`tail +6 $0 | cksum | sed -e 's/ /Z/' -e 's/        /Z/' | cut -dZ -f1`
  132.     [ $sum1 != $CRCsum ] && {
  133.         $echo Error in check sums $sum1 $CRCsum
  134.         eval $finish; exit 2;
  135.     }
  136.     echo OK
  137. fi
  138. if [ $MD5 != "00000000000000000000000000000000" ]; then
  139. # space separated list of directories
  140.   [ x"$GUESS_MD5_PATH" = "x" ] && GUESS_MD5_PATH="/usr/local/ssl/bin /usr/local/bin /usr/bin"
  141.   MD5_PATH=""
  142.   for a in $GUESS_MD5_PATH; do
  143.     #if which $a/md5 >/dev/null 2>&1 ; then
  144.     if [ -x "$a/md5sum" ]; then
  145.        MD5_PATH=$a;
  146.     fi
  147.   done
  148.   if [ -x $MD5_PATH/md5sum ]; then
  149.     md5sum=`tail +6 $0 | $MD5_PATH/md5sum | cut -b-32`;
  150.     [ $md5sum != $MD5 ] && {
  151.       $echo Error in md5 sums $md5sum $MD5
  152.       eval $finish; exit 2;
  153.     }
  154.   fi
  155. fi
  156. UnTAR() { tar xvf - || { echo Extraction failed. > /dev/tty; kill -15 $$; } ; }
  157. $echo -n "Uncompressing $label"
  158. cd $tmpdir ; res=3
  159. [ "$keep" = y ] || trap 'echo Signal caught, cleaning up > /dev/tty; cd $TMPROOT; /bin/rm -rf $tmpdir; eval $finish; exit 15' 1 2 15
  160. if (cd "$location"; tail +$skip $0; ) | gzip -cd | UnTAR |  (while read a; do $echo -n .; done; echo; ); then
  161.         chown -Rf `id -u`.`id -g` .
  162.     res=0; if [ x"$script" != x ]; then
  163.                 if [ x"$verbose" = xy ]; then
  164.                         $echo "OK to execute: $script $scriptargs $* ? [Y/n] "
  165.                         read yn
  166.                         [ x"$yn" = x -o x"$yn" = xy -o x"$yn" = xY ] && { $script $scriptargs $*; res=$?; }
  167.                 else
  168.                         $script $scriptargs $*; res=$?
  169.                 fi
  170.                 [ $res != 0 ] && echo "The program returned an error code ($res)"
  171.         fi
  172.     [ "$keep" = y ] || { cd $TMPROOT; /bin/rm -rf $tmpdir; }
  173. else
  174.   echo "Cannot decompress $0"; eval $finish; exit 1
  175. fi
  176. eval $finish; exit $res
  177. END_OF_STUB
复制代码
发表于 2005-2-5 09:21:33 | 显示全部楼层
初步判定是权限或md5校验失败。

你不妨把gentoo下的cp回红旗下,看看是不是也不可以了。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-2-5 10:53:45 | 显示全部楼层
考过去是好用的,在我电脑上虚拟的rh73里也是好用的。
前些天下载的模拟城市3000也出现这样的问题。郁闷ing
回复 支持 反对

使用道具 举报

发表于 2005-2-5 13:00:33 | 显示全部楼层
在Gentoo为什么不emerge ?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-2-5 13:56:26 | 显示全部楼层
gentoo里面有这个么?我没找到

root@Jack /home/gray # emerge -s wolf
Searching...
[ Results for search key : wolf ]
[ Applications found : 2 ]

*  games-arcade/solarwolf
      Latest version available: 1.5
      Latest version installed: [ Not Installed ]
      Size of downloaded files: 1,997 kB
      Homepage:    http://www.pygame.org/shredwheat/solarwolf/
      Description: action/arcade recreation of SolarFox
      License:     LGPL-2.1

*  games-fps/wolfgl
      Latest version available: 0.93-r1
      Latest version installed: [ Not Installed ]
      Size of downloaded files: 1,238 kB
      Homepage:    http://wolfgl.sourceforge.net/
      Description: Wolfenstein and Spear of Destiny port using OpenGL
      License:     GPL-2
回复 支持 反对

使用道具 举报

发表于 2005-2-5 14:20:29 | 显示全部楼层
Post by graydream
gentoo里面有这个么?我没找到

先挂好CD,然后:
# emerge rtcw
完了之后要将PAK0.PK3 MP_PAK0.PK3 MP_PAK1.PK3 MP_PAK2.PK3 SP_PAK1.PK3和 SP_PAK2.PK3之类的文档拷至/opt/rtcw/main。启动单机游戏用wolfsp,多机用wolf。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表