📄 install.sh
字号:
SETUPTYPE=1 fi if [ "$SETUPTYPE" = "9" ] then $ECHO "\nInstall Exiting" exit 1 fi if [ "$SETUPTYPE" = "1" ] then EXITTYPECHOICELOOP="1" installcomps=$standardcomps fi if [ "$SETUPTYPE" = "2" ] then EXITTYPECHOICELOOP="1" installcomps=$dynatextcomps fi if [ "$EXITTYPECHOICELOOP" = "0" ] then printf "\nPlease enter a number from the list\n" fi done fi #------------------------------ # Select installation directory #------------------------------ EXITOSCHOICELOOP=0 while [ "$EXITOSCHOICELOOP" = "0" ] do $ECHO "Please enter the location of your ADS/ADU installation" printf "[$DEFINSTDIR]: " read INSTDIR if [ "$INSTDIR" = "" ] then INSTDIR="$DEFINSTDIR" fi #------------------------------------- # Check installation directory exists #------------------------------------- if [ ! -d "$INSTDIR" ] then $ECHO "The location you entered is invalid\n" else # To confirm that ADS is installed, check that armcc # exists in one of the bin directories. The following # elaborate code is needed because sh on Linux cannot # cope with [ -f "$INSTDIR"/*/bin/armcc ]. FILE_FOUND=0; for SEARCH_FILE in "$INSTDIR"/*/bin/armcc do if [ -f $SEARCH_FILE ] then FILE_FOUND=1; fi done if [ "$FILE_FOUND" = "1" ] then EXITOSCHOICELOOP=1 else # To confirm that ADU is installed, check that # adu exists in one of the bin directories. The # following elaborate code is needed because sh # on Linux cannot cope with # [ -f "$INSTDIR"/*/adu ]. FILE_FOUND=0; for SEARCH_FILE in "$INSTDIR"/*/adu do if [ -f $SEARCH_FILE ] then FILE_FOUND=1; fi done if [ "$FILE_FOUND" = "1" ] then installcomps=$standardcomps SETUPTYPE=1 solbindir="bin.sol2" hpuxbindir="bin.hp700mt" linuxbindir="bin.linux_i32" EXITOSCHOICELOOP=1 else $ECHO "Could not find an ADS or ADU installation in :$INSTDIR:" fi fi fi done #-------------------------------------------------------------- # Show installation options and either start install or go back #-------------------------------------------------------------- EXITLOOP=0 while [ "$EXITLOOP" = "0" ] do $ECHO "\nInstallation Options" $ECHO "====================\n" $ECHO "You are about to install\n" if [ "$PLATOPTION" = "1" ] then $ECHO " - $PRODUCT_NAME (Solaris version)" fi if [ "$PLATOPTION" = "2" ] then $ECHO " - $PRODUCT_NAME (HP-UX version)" fi if [ "$PLATOPTION" = "3" ] then $ECHO " - $PRODUCT_NAME (Solaris version)" $ECHO " - $PRODUCT_NAME (HP-UX version)" fi if [ "$PLATOPTION" = "4" ] then $ECHO " - $PRODUCT_NAME (Linux x86 version)" fi $ECHO "\ninto directory '$INSTDIR'\n" $ECHO "Components to be installed:" for c in ${installcomps}; do Explain_Component done $ECHO "\nOptions" $ECHO "-------" $ECHO " 1. to continue." $ECHO " 2. to go back and change options.\n" printf "Select option [1]: " read OPTION if [ "$OPTION" = "" ] then OPTION=1 fi if [ "$OPTION" = "1" ] then EXITLOOP=1 EXITSELECTLOOP=1 fi if [ "$OPTION" = "2" ] then EXITLOOP=1 fi done doneCURRDIR=`pwd`cd "$INSTDIR"#--------------------# Final checks#--------------------DOING_LINUX=nDOING_HPUX=nDOING_SOLARIS=nif [ "$SETUPTYPE" = "2" ]then if [ ! -d "$INSTDIR"/dtext4? ] then $ECHO "\nError: You do not have the Dynatext browser" $ECHO " installed in your ADS directory." $ECHO " Installer exiting (no changes made)." exit 1 fifiif [ "$PLATOPTION" = "1" ]then DOING_SOLARIS=y if [ ! -d "$solbindir" ] then $ECHO "\nError: ADS/ADU is not installed for Solaris." $ECHO " Installer exiting (no changes made)." exit 1 fifiif [ "$PLATOPTION" = "2" ]then DOING_HPUX=y if [ ! -d "$hpuxbindir" ] then $ECHO "\nError: ADS/ADU is not installed for HPUX." $ECHO " Installer exiting (no changes made)." exit 1 fifiif [ "$PLATOPTION" = "3" ]then DOING_SOLARIS=y if [ ! -d "$solbindir" ] then $ECHO "\nError: ADS/ADU is not installed for Solaris." $ECHO " Installer exiting (no changes made)." exit 1 fi DOING_HPUX=y if [ ! -d "$hpuxbindir" ] then $ECHO "\nError: ADS/ADU is not installed for HPUX." $ECHO " Installer exiting (no changes made)." exit 1 fi fiif [ "$PLATOPTION" = "4" ]then DOING_LINUX=y if [ ! -d "$linuxbindir" ] then $ECHO "\nError: ADS/ADU is not installed for Linux x86." $ECHO " Installer exiting (no changes made)." exit 1 fifiif [ ! -d common ]then mkdir commonfi#--------------------# Install the product#--------------------for c in ${installcomps}do One_Componentdone#-------# Finish#-------cd "$CURRDIR"cp micesetup.sh "$INSTDIR"chmod u+w,a+rx "$INSTDIR"/micesetup.sh$ECHO "\n====================================================================="$ECHO "\nInstallation is complete"$ECHO "\n====================================================================="$ECHO "IMPORTANT"$ECHO "\nUpdated processor description files for ADS v1.1 and v1.2 (used"$ECHO "by AXD) are available on the $PRODUCT_NAME v2.2 CD in the /unix/ads"$ECHO "directory. To install these updates copy the contents of /unix/ads"$ECHO "from the $PRODUCT_NAME v2.2 CD into your ADS v1.1 or ADS v1.2 bin directory."$ECHO "\nEach user who wants to use $PRODUCT_NAME must first run the"$ECHO "micesetup.sh script. Run this from your ADS or ADU installation"$ECHO "directory, and make sure your environment is set up as it would"$ECHO "normally be before running an ARM debugger (you can do this by"$ECHO "running the ads.cshrc file installed by the ADS installer)"$ECHO "=====================================================================\n"printf "Please read the above notice and then press Enter to continue."read RESPONSE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -