mkbdist

来自「LINUX lilo-22.7.1 源代码。」· 代码 · 共 72 行

TXT
72
字号
#!/bin/sh#MINOR=`grep VERSION_MINOR <version.h | sed -e "s/.*VERSION_MINOR *//" `MAJOR=`grep VERSION_MAJOR <version.h | sed -e "s/.*VERSION_MAJOR *//" `MEDIT=`grep <version.h VERSION_EDIT | sed -e "s/.*VERSION_EDIT *\"//" -e "s/\" *//"`VERSION=$(echo $MAJOR.$MINOR)VERSNUM=$(echo $MAJOR.$MINOR$MEDIT)SBIN=sbinBOOT=bootDOS=dosMAN=manUSR=usrMAN_DIR=$USR/$MANUSRSBIN_DIR=$USR/$SBINBINARY=lilo-$VERSNUM.bin.tar.gzSTATIC=lilo-$VERSNUM.bin.static.tar.gzDIR=$(pwd)echo VERSION = $VERSIONecho VERSNUM = $VERSNUMmake allesmake tidy	if [ ! -d $SBIN ]; then mkdir $SBIN; fi	if [ ! -d $BOOT ]; then mkdir $BOOT; fi	if [ ! -d $USR ]; then mkdir $USR; fi	if [ ! -d $USRSBIN_DIR ]; then mkdir $USRSBIN_DIR; fi  	if [ ! -d $MAN_DIR ]; then mkdir $MAN_DIR; fi  	if [ ! -d $MAN_DIR/man5 ]; then \	  mkdir $MAN_DIR/man5; fi  	if [ ! -d $MAN_DIR/man8 ]; then \	  mkdir $MAN_DIR/man8; fi  	if [ -f diag1.img ]; then \	  cp -f diag1.img $BOOT; fi	if [ -f diag2.img ]; then \	  cp -f diag2.img $BOOT; fi	cp mkrescue $SBIN	cp lilo $SBIN	strip $SBIN/lilo	cp keytab-lilo.pl $USRSBIN_DIR	cp manPages/lilo.8 $MAN_DIR/man8	cp manPages/mkrescue.8 $MAN_DIR/man8	cp manPages/lilo.conf.5 $MAN_DIR/man5	gzip -9 $MAN_DIR/man8/lilo.8	gzip -9 $MAN_DIR/man8/mkrescue.8	gzip -9 $MAN_DIR/man5/lilo.conf.5pushd ..DISTDIR=$(pwd)popdtar cvf - COPYING \  $SBIN/* $BOOT/* $USRSBIN_DIR/* $MAN_DIR/* $DOS/lilo.com |  gzip -9 > $BINARYcp -f lilo-static $SBIN/lilostrip $SBIN/lilotar cvf - COPYING \  $SBIN/* $BOOT/* $MAN_DIR/* $USRSBIN_DIR/* $DOS/lilo.com |  gzip -9 > $STATICmv -fv $BINARY $STATIC $DISTDIRecho ""echo $BINARY is in $DISTDIRecho $STATIC is in $DISTDIR# make tidy

⌨️ 快捷键说明

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