📄 mksimdir.ksh
字号:
#! /bin/ksh### Copyright 1992# Georgia Tech Research Corporation# All Rights Reserved.# This material may be reproduced by or for the U.S. Government# pursuant to the copyright license under the clause at DFARS# 252.227-7013 (Oct. 1988)### MKSIMDIR - create a simulator directory and install default template files## NOTE: must use ksh since Apollo sh does not support shell functions.## usage: mksimdir [directory]## If the directory name is not given on the command line, it is read# interactively.## Bill Kuhn - March 1991 (Adapted from Steve Tynor's mkmoddir script)## Include global XSPICE definitions. /usr/local/xspice-1-0/include/shell.includetemplate_dir=$ROOT/lib/cmt/mksimdirtempl_mf=$template_dir/Makefile.tpltempl_mod_lst=$template_dir/modpath.tpltempl_udn_lst=$template_dir/udnpath.tplprog=$0usage (){ echo echo Error: $* echo usage: mksimdir [directory] echo exit 1}dirname=# Get directory name from command line if suppliedechowhile [ -n "$1" ]do case $1 in ?*) if [ -n "$dirname" ] then usage Directory name already set. fi dirname=$1 ;; esac shiftdone# If not supplied on command line, prompt for directory name.if [ -z "$dirname" ]then echo -n "Directory name: " read dirnamefiif [ -z "$dirname" ]then echo echo ERROR: invalid directory. echo exit 1fi# Create the new directoryechomkdir $dirnameif [ 0 != $? ]then echo echo ERROR: mkdir failed - unable to create simulator directory: $dirname. echo exit 1fi# Copy over the file templates.cp $templ_mf $dirname/Makefileif [ 0 != $? ]then echo echo ERROR: Makefile copy failed. echo exit 1ficp $templ_mod_lst $dirname/modpath.lstif [ 0 != $? ]then echo echo ERROR: modpath.lst template copy failed. echo exit 1ficp $templ_udn_lst $dirname/udnpath.lstif [ 0 != $? ]then echo echo ERROR: udnpath.lst template copy failed. echo exit 1fi# Report successechoecho Simulator directory \"$dirname\" created.echoecho Edit files \"modpath.lst\" and \"udnpath.lst\" toecho specify desired models and node types respectively.echo Then run \"make\" to build the simulator executable.echoexit 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -