URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [gdb-5.0/] [mpw-install] - Rev 1769
Go to most recent revision | Compare with Previous | Blame | View Log
# GNU Install script for MPW.Set OldExit "{Exit}"Set Exit 0Set TempUserStartup "{TempFolder}"__temp__UserStartupEcho '# UserStartup generated by GNU Install script' > "{TempUserStartup}"Echo '' >> "{TempUserStartup}"# (should) Check that disk space is sufficient for installation.# Assume that the install script is where everything else is.Set thisdir "`Directory`"# Copy the binaries to the desired place.Confirm -t "Copy the binaries to somewhere else?"Set TmpStatus {Status}If {TmpStatus} == 0Set bindest "`GetFileName -d -m "Where to install the binaries?"`"If {Status} == 0If "`Exists "{thisdir}bin"`" != ""For afile In "{thisdir}"bin:\Option-xDuplicate -y "{afile}" "{bindest}"End ForElseEcho "bin directory not found, exiting"Exit 1End IfElseEcho "No destination supplied, exiting"Exit 1End IfElse If {TmpStatus} == 4# Use the existing directory.Set bindest "{thisdir}bin:"Else# Cancelled from confirmation, escape altogether.Exit 1End If# Copy the libraries to the desired place.Confirm -t "Copy the libraries to somewhere else?"Set TmpStatus {Status}If {TmpStatus} == 0Set libdest "`GetFileName -d -m "Where to install the libraries?"`"If {Status} == 0If "`Exists "{thisdir}lib:"`" != ""For afile In "{thisdir}"lib:\Option-xDuplicate -y "{afile}" "{libdest}"End ForElseEcho "lib directory not found, exiting"Exit 1End IfElseEcho "No destination supplied, exiting"Exit 1End IfElse If {TmpStatus} == 4# Use the existing directory.Set libdest "{thisdir}lib:"Else# Cancelled from confirmation, escape altogether.Exit 1End If# Add the location of the binaries to the command path.Echo -n 'Set Commands "' >> "{TempUserStartup}"Echo -n "{bindest}" >> "{TempUserStartup}"Echo ',{Commands}"' >> "{TempUserStartup}"Echo '' >> "{TempUserStartup}"# Set up GCC exec prefix.Set gcclibdir "{libdest}"gcc-lib:Echo -n 'Set GCC_EXEC_PREFIX "' >> "{TempUserStartup}"Echo -n "{gcclibdir}" >> "{TempUserStartup}"Echo '"' >> "{TempUserStartup}"Echo "Export GCC_EXEC_PREFIX" >> "{TempUserStartup}"Echo '' >> "{TempUserStartup}"# Set up path to libgcc.xcoff etc.Echo -n 'Set GCCPPCLibraries "' >> "{TempUserStartup}"Echo -n "{libdest}" >> "{TempUserStartup}"Echo '"' >> "{TempUserStartup}"Echo "Export GCCPPCLibraries" >> "{TempUserStartup}"Echo '' >> "{TempUserStartup}"# Display contents of UserStartup, confirm installation.Set UserStartupName "UserStartup\Option-8GNU"Echo "Contents of" {UserStartupName} "will be:"Catenate "{TempUserStartup}"Confirm "Install {UserStartupName} into the MPW folder {MPW} ?"If {Status} == 0Duplicate "{TempUserStartup}" "{MPW}{UserStartupName}"Delete -y "{TempUserStartup}"ElseEcho "{UserStartupName} file not installed"End If# (should) Check HEXA resource, warn if low.# (should) Check for spaces in pathnames, warn if found.Echo "Installation was successful."Echo ""Echo "Be sure to review the usage notes in 'Read Me for MPW' before proceeding!"# Restore previous settings.Set Exit "{OldExit}"
Go to most recent revision | Compare with Previous | Blame | View Log
