⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basic-1

📁 实战Linux编程的原代码,希望对学驱动的人能有所帮助
💻
字号:
#! /bin/shif test "$VERBOSE" = yes; then  set -x  ginstall --versionfidir=dirfile=filepwd=`pwd`tmp=inst-basic.$$trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0trap 'exit $?' 1 2 13 15framework_failure=0mkdir $tmp || framework_failure=1cd $tmp || framework_failure=1rm -rf $dir $file || framework_failure=1mkdir -p $dir || framework_failure=1echo foo > $file || framework_failure=1if test $framework_failure = 1; then  echo 'failure in testing framework'  exit 1fifail=0ginstall $file $dir || fail=1# Make sure the source file still exists.test -f $file || fail=1# Make sure the dest file has been created.test -f $dir/$file || fail=1# Make sure strip works.cp ../../../src/dd .cp dd dd2strip dd2 || \  {    cat 1>&2 <<EOF$0: WARNING!!!Your strip command doesn't seem to work, so skippingthe test of install's --strip option.EOF    exit 77  }# This test would fail with 3.16s when using versions of strip that# don't work on read-only files (the one from binutils works fine).ginstall -s -c -m 555 dd $dir || fail=1# Make sure the source file is still around.test -f dd || fail=1# Make sure that the destination file has the requested permissions.set X `ls -l $dir/dd`shifttest "$1" = -r-xr-xr-x || fail=1(exit $fail); exit

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -