diff --git a/dynadjust/CMakeLists.txt b/dynadjust/CMakeLists.txt index 37b8ffbf..8f97b530 100644 --- a/dynadjust/CMakeLists.txt +++ b/dynadjust/CMakeLists.txt @@ -14,10 +14,10 @@ endif() #set(CMAKE_VERBOSE_MAKEFILE ON) -message (STATUS " " ) -message (STATUS "**********************************************" ) -message (STATUS "Configuring DynAdjust ${DYNADJUST_VERSION} (${CMAKE_BUILD_TYPE}) build using cmake..." ) -message (STATUS " " ) +message (" ") +message ("===========================================================================") +message ("Configuring DynAdjust ${DYNADJUST_VERSION} (${CMAKE_BUILD_TYPE}) build using cmake...") +message (" ") if(UNIX) set(DNA_PROGRAM_PREFIX "dna") @@ -51,29 +51,29 @@ else() set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-as-needed") endif() -message (STATUS "Looking for xerces-c..." ) +message (STATUS "Looking for xerces-c...") find_package (XercesC COMPONENTS xerces-c REQUIRED) if (NOT XERCESC_FOUND ) set (DNA_BUILD_ERROR 1) set (XERCES_FIND_ERROR 1) message (SEND_ERROR "Cannot find XercesC library") else () - message (STATUS "xerces-c seems to be installed correctly." ) + message (STATUS "xerces-c seems to be installed correctly.") endif () -message (STATUS " " ) +message (" ") -message (STATUS "Looking for xsd headers..." ) +message (STATUS "Looking for xsd headers...") find_package (XSD REQUIRED) if (NOT XSD_FOUND ) set (DNA_BUILD_ERROR 1) set (XSD_FIND_ERROR 1) message (SEND_ERROR "Cannot find XSD library") else () - message (STATUS "xsd headers seem to be installed correctly." ) + message (STATUS "xsd headers seem to be installed correctly.") endif () -message (STATUS " " ) +message (" ") -message (STATUS "Looking for boost..." ) +message (STATUS "Looking for boost...") set (Boost_USE_MULTITHREADED ON) set (BOOST_MIN_VERSION "1.58.0") find_package (Boost ${BOOST_MIN_VERSION} COMPONENTS system filesystem timer thread program_options REQUIRED) @@ -84,9 +84,9 @@ if (NOT Boost_FOUND ) else () message (STATUS "boost seems to be installed correctly.") endif () -message (STATUS " ") +message (" ") -message (STATUS "Looking for intel math kernel library (mkl)..." ) +message (STATUS "Looking for intel math kernel library (mkl)...") find_package (MKL COMPONENTS mkl_blas95_ilp64 mkl_intel_ilp64 mkl_intel_thread mkl_core REQUIRED) if (NOT MKL_FOUND ) set (DNA_BUILD_ERROR 1) @@ -95,7 +95,7 @@ if (NOT MKL_FOUND ) else () message (STATUS "MKL seems to be installed correctly.") endif () -message (STATUS " ") +message (" ") if (CMAKE_SYSTEM_NAME MATCHES "Darwin") find_library(IOMP5_LIB iomp5 PATHS /opt/intel/lib) @@ -112,13 +112,13 @@ set (DNA_LIBRARIES ${Boost_LIBRARIES} ${XERCESC_LIBRARY} ${MKL_LIBRARIES} ${IOMP message (STATUS "DynAdjust library dependencies:") message (STATUS ${DNA_LIBRARIES}) -message (STATUS "") +message (" ") include_directories( ${CMAKE_SOURCE_DIR} ${Boost_INCLUDE_DIRS} ${MKL_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIR} ${XSD_INCLUDE_DIR}) if (DNA_BUILD_ERROR) - message (STATUS " " ) - message (STATUS "**********************************************" ) + message (" ") + message (STATUS "**********************************************") message (STATUS "Cannot build DynaAjust ${DYNADJUST_VERSION}. Missing components:") if (XERCES_FIND_ERROR) message (STATUS " xerces-c") @@ -135,34 +135,34 @@ endif () if (IOMP5_FIND_ERROR) message (STATUS " iomp5") endif () - message (STATUS " ") + message (" ") message (FATAL_ERROR "Build terminating.") endif () -message (STATUS "configuring import" ) +message (STATUS "Configuring import") add_subdirectory (dynadjust/dnaimportwrapper) -message (STATUS "configuring reftran" ) +message (STATUS "Configuring reftran") add_subdirectory (dynadjust/dnareftranwrapper) -message (STATUS "configuring segment" ) +message (STATUS "Configuring segment") add_subdirectory (dynadjust/dnasegmentwrapper) -message (STATUS "configuring geoid" ) +message (STATUS "Configuring geoid") add_subdirectory (dynadjust/dnageoidwrapper) -message (STATUS "configuring adjust" ) +message (STATUS "Configuring adjust") add_subdirectory (dynadjust/dnaadjustwrapper) -message (STATUS "configuring plot" ) +message (STATUS "Configuring plot") add_subdirectory (dynadjust/dnaplotwrapper) -message (STATUS "configuring dynadjust" ) +message (STATUS "Configuring dynadjust") add_subdirectory (dynadjust/dynadjust) if (BUILD_TESTING) - message (STATUS " " ) - message (STATUS "configuring tests" ) + message (" ") + message (STATUS "Configuring tests") # test execution of dynadjust binaries # 1. gnss network (simultaneous) add_test (NAME import-gnss-network COMMAND $ -n gnss ${CMAKE_SOURCE_DIR}/../sampleData/gnss-network.stn ${CMAKE_SOURCE_DIR}/../sampleData/gnss-network.msr --export-dna --export-xml --export-asl --export-aml --export-map --output-msr-to-stn --test-integrity -r GDA94) @@ -199,9 +199,7 @@ if (BUILD_TESTING) set_tests_properties(test-gnss-network PROPERTIES DEPENDS adjust-gnss-network) endif () -message (STATUS " " ) -message (STATUS "finished configuring DynAdjust ${DYNADJUST_VERSION} (${CMAKE_BUILD_TYPE})." ) -message (STATUS "**********************************************" ) -message (STATUS " " ) -#message (STATUS "Now run make to build DynAdjust ${DYNADJUST_VERSION} (${CMAKE_BUILD_TYPE}) binaries" ) -#message (STATUS " " ) +message (" ") +message ("===========================================================================") +message ("Finished configuring DynAdjust ${DYNADJUST_VERSION} (${CMAKE_BUILD_TYPE}).") +message (" ") diff --git a/resources/install_dynadjust_prerequisites.sh b/resources/install_dynadjust_prerequisites.sh old mode 100644 new mode 100755 index b2abac46..be0f388f --- a/resources/install_dynadjust_prerequisites.sh +++ b/resources/install_dynadjust_prerequisites.sh @@ -10,7 +10,7 @@ ################################################################################# # Capture system variables and set defaults -if [ -e "/etc/os-release" ]; then +if [[ -e "/etc/os-release" ]]; then # NAME="CentOS Linux" # NAME="Red Hat Enterprise Linux Server" # NAME=Fedora @@ -61,7 +61,7 @@ function help { } # get argument parameters -while [ "$1" != "" ]; +while [[ "$1" != "" ]]; do case $1 in -d | --distro ) shift @@ -85,7 +85,7 @@ done # Checks valid values function args_check { - if [ $_mode -lt 0 ] || [ $_mode -gt 3 ]; then + if [[ $_mode -lt 0 ]] || [[ $_mode -gt 3 ]]; then # error echo -e "\nUnknown value: --mode $_mode" help @@ -96,19 +96,19 @@ function args_check { firstletter=${firstletter:0:1} # Check if distribution argument is not empty. If empty, _distro is set by default - if [ ! -z $_distribution ]; then + if [[ ! -z $_distribution ]]; then # Set distro based on first character - if [ $firstletter = "C" ]; then + if [[ "$firstletter" = "C" ]]; then _distro="CentOS Linux" - elif [ $firstletter = "R" ]; then + elif [[ "$firstletter" = "R" ]]; then _distro="Red Hat Enterprise Linux Server" - elif [ $firstletter = "F" ]; then + elif [[ "$firstletter" = "F" ]]; then _distro="Fedora" - elif [ $firstletter = "O" ]; then + elif [[ "$firstletter" = "O" ]]; then _distro="openSUSE" - elif [ $firstletter = "U" ]; then + elif [[ "$firstletter" = "U" ]]; then _distro="Ubuntu" - elif [ $firstletter = "D" ]; then + elif [[ "$firstletter" = "D" ]]; then _distro="Debian" else # error @@ -118,17 +118,17 @@ function args_check { fi fi - if [ $_mode -gt 0 ]; then + if [[ "$_mode" -gt 0 ]]; then echo -e "\n===========================================================================" echo -e "Installing prerequisites automatically without user input..." fi # print outcome - if [ $1 -eq 1 ]; then + if [[ $1 -eq 1 ]]; then echo -e "\nos: $OSTYPE"; - echo "distro: ${_distro}"; - case ${_mode} in + echo "distro: $_distro"; + case $_mode in 0) echo "mode: interactive";; 1) echo "mode: package manager";; 2) echo "mode: build from source";; @@ -140,7 +140,7 @@ function args_check { exit 1 # error ;; esac - echo -e "system: ${_system}\n"; + echo -e "system: $_system\n"; fi @@ -169,47 +169,47 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then if [[ "$_distro" == "CentOS"* || "$_distro" == "Red Hat"* ]]; then # NAME="CentOS Linux" # NAME="Red Hat Enterprise Linux Server" - _repo_intel="${_repo_intel_yum}" - _gpg_intel="${_gpg_intel_yum}" - _toolset="${_toolset_yum}" - _format="${_format_rpm}" + _repo_intel="$_repo_intel_yum" + _gpg_intel="$_gpg_intel_yum" + _toolset="$_toolset_yum" + _format="$_format_rpm" elif [[ "$_distro" == "Fedora"* ]]; then # NAME=Fedora - _repo_intel="${_repo_intel_yum}" - _gpg_intel="${_gpg_intel_yum}" - _toolset="${_toolset_dnf}" - _format="${_format_rpm}" + _repo_intel="$_repo_intel_yum" + _gpg_intel="$_gpg_intel_yum" + _toolset="$_toolset_dnf" + _format="$_format_rpm" elif [[ "$_distro" == *"SUSE"* ]]; then # NAME="openSUSE Leap" # NAME=openSUSE - _repo_intel="${_repo_intel_yum}" - _gpg_intel="${_gpg_intel_yum}" - _toolset="${_toolset_zyp}" - _format="${_format_rpm}" + _repo_intel="$_repo_intel_yum" + _gpg_intel="$_gpg_intel_yum" + _toolset="$_toolset_zyp" + _format="$_format_rpm" elif [[ "$_distro" == "Ubuntu" || "$_distro" == "Debian"* ]]; then # NAME="Ubuntu" # NAME="Debian GNU/Linux" - _repo_intel="${_repo_intel_apt}" - _gpg_intel="${_gpg_intel_apt}" - _toolset="${_toolset_apt}" - _format="${_format_deb}" + _repo_intel="$_repo_intel_apt" + _gpg_intel="$_gpg_intel_apt" + _toolset="$_toolset_apt" + _format="$_format_deb" else # Unknown. echo " " - echo "I don't know where to find ${OSTYPE} or Intel MKL repos for ${_distro} and am going to quit." + echo "I don't know where to find $OSTYPE or Intel MKL repos for $_distro and am going to quit." echo " " exit fi elif [[ "$OSTYPE" == "darwin"* ]]; then # Mac OSX echo " " - echo "I don't know how to handle ${OSTYPE} and am going to quit." + echo "I don't know how to handle $OSTYPE and am going to quit." echo " " exit else # Unknown. echo " " - echo "I don't know how to handle ${OSTYPE} and am going to quit." + echo "I don't know how to handle $OSTYPE and am going to quit." echo " " exit fi @@ -224,19 +224,19 @@ echo -e "\n===================================================================== echo "Installation of dynadjust prerequisites" echo " " echo "Environment:" -echo " distro: ${_distro}" -echo " system: ${_system}" -echo " format: ${_format}" -echo " package manager: ${_toolset}" +echo " distro: $_distro" +echo " system: $_system" +echo " format: $_format" +echo " package manager: $_toolset" echo "Installing:" -echo " boost https://boost.org (via ${_toolset} repos)" -echo " intel mkl ${_repo_intel}" +echo " boost https://boost.org (via $_toolset repos)" +echo " intel mkl $_repo_intel" echo " xerces-c http://archive.apache.org" echo " xsd https://www.codesynthesis.com" # # determine if user needs prompting -case ${_mode} in +case $_mode in 0) # interactive echo " " read -r -p "Is this ok [Y/n]: " response;; @@ -254,7 +254,7 @@ fi # get current directory _cwd="$PWD" -echo "Prerequisites Log" > "${_cwd}/prequisites.log" 2>&1 +echo "Prerequisites Log" | tee "$_cwd/prerequisites.log" # # get standard yum repos for building c++ projects @@ -262,17 +262,17 @@ echo -e "\n===================================================================== echo "Checking for the following packages (install if missing):" # Install basic packages from package manager -if [[ "${_format}" == "rpm" ]]; then +if [[ "$_format" == "rpm" ]]; then echo " bzip2, wget, cmake, make, gcc-c++, git and boost + boost-devel..." echo " " - sudo ${_toolset} install bzip2 wget cmake make gcc-c++ git boost boost-devel -elif [[ "${_format}" == "deb" ]]; then + sudo "$_toolset" install bzip2 wget cmake make gcc-c++ git boost boost-devel +elif [[ "$_format" == "deb" ]]; then echo " bzip2, wget, cmake, make, gcc-c++, git and libboost-all-dev..." echo " " - sudo ${_toolset}-get install bzip2 wget cmake make gcc git libboost-system-dev libboost-filesystem-dev libboost-timer-dev libboost-thread-dev libboost-program-options-dev + sudo "$_toolset-get" install bzip2 wget cmake make gcc git libboost-system-dev libboost-filesystem-dev libboost-timer-dev libboost-thread-dev libboost-program-options-dev else echo " " - echo "I don't know how to handle ${OSTYPE} or ${_distro} and am going to quit." + echo "I don't know how to handle $OSTYPE or $_distro and am going to quit." echo " " exit fi @@ -282,7 +282,7 @@ echo "Installation of Intel Math kernel Library (MKL):" # # determine if/how to install intel mkl -case ${_mode} in +case $_mode in 0) # interactive echo " " read -r -p "Download and install Intel MKL [Y/n]: " mklresponse;; @@ -298,30 +298,30 @@ then echo -e "Skipping Intel MKL installation.\n" else # Install MKL for rpm based distros (Fedora, CentOS, Red Hat, SUSE, OpenSUSE) - if [[ "${_format}" == "rpm" ]]; then - sudo ${_toolset} config-manager --add-repo ${_repo_intel} - sudo ${_format} --import ${_gpg_intel} - sudo ${_toolset} install intel-mkl + if [[ "$_format" == "rpm" ]]; then + sudo "$_toolset" config-manager --add-repo "$_repo_intel" + sudo "$_format" --import "$_gpg_intel" + sudo "$_toolset" install intel-mkl # Install MKL for deb based distros (Ubuntu, Debian) - elif [[ "${_format}" == "deb" ]]; then - wget ${_gpg_intel} - sudo ${_toolset}-key add ${_gpg_intel_keyfile} + elif [[ "$_format" == "deb" ]]; then + wget "$_gpg_intel" + sudo "$_toolset-key" add "$_gpg_intel_keyfile" sudo sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list' - sudo ${_toolset}-get update && sudo ${_toolset}-get install intel-mkl-64bit-2020.1-102 + sudo "$_toolset-get" update && sudo "$_toolset-get" install intel-mkl-64bit-2020.1-102 else echo " " - echo "I don't know how to handle ${OSTYPE} or ${_distro} and am going to quit." + echo "I don't know how to handle $OSTYPE or $_distro and am going to quit." echo " " exit fi - if [ -e ${_gpg_intel_keyfile} ]; then - rm -f ${_gpg_intel_keyfile} + if [[ -e "$_gpg_intel_keyfile" ]]; then + rm -f "$_gpg_intel_keyfile" fi fi DOWNLOADS_FOLDER="~/downloads" -DOWNLOADS_FOLDER_FULLPATH="`eval echo ${DOWNLOADS_FOLDER//>}`" +eval DOWNLOADS_FOLDER_FULLPATH="$DOWNLOADS_FOLDER" # @@ -330,14 +330,14 @@ echo -e "\n===================================================================== echo -e "Installation of Apache Xerces-C++ XML Parser (xerces-c)\n" # # determine how to install xerces-c -case ${_mode} in +case $_mode in 0) # interactive COLUMNS=1 PS3='Select which method to use to install xerces-c: ' - select opt in "Package manager (${_toolset})" "Build xerces-c from source and install to /opt" "Skip installation" + select opt in "Package manager ($_toolset)" "Build xerces-c from source and install to /opt" "Skip installation" do case $opt in - "Package manager (${_toolset})") + "Package manager ($_toolset)") break ;; "Build xerces-c from source and install to /opt") @@ -364,19 +364,19 @@ case ${_mode} in esac # Package manager -if [ ${REPLY} == 1 ]; then +if [[ $REPLY == 1 ]]; then echo " " - echo "Installing xerces-c via ${_toolset}..." + echo "Installing xerces-c via $_toolset..." # Install xerces-c for rpm based distros (Fedora, CentOS, Red Hat, SUSE, OpenSUSE) - if [[ "${_format}" == "rpm" ]]; then - sudo ${_toolset} install xerces-c-devel + if [[ "$_format" == "rpm" ]]; then + sudo "$_toolset" install xerces-c-devel # Install xerces-c for deb based distros (Ubuntu, Debian) - elif [[ "${_format}" == "deb" ]]; then - sudo ${_toolset}-get install libxerces-c-dev + elif [[ "$_format" == "deb" ]]; then + sudo "$_toolset-get" install libxerces-c-dev else echo " " - echo "I don't know how to handle ${OSTYPE} or ${_distro} and am going to quit." + echo "I don't know how to handle $OSTYPE or $_distro and am going to quit." echo " " exit fi @@ -384,56 +384,56 @@ if [ ${REPLY} == 1 ]; then echo " " # Build from source -elif [ ${REPLY} == 2 ]; then +elif [[ $REPLY == 2 ]]; then echo " " echo "Installing xerces-c from source..." # 1. create install dir: - if [ ! -d "/opt/xerces-c" ]; then + if [[ ! -d "/opt/xerces-c" ]]; then sudo mkdir /opt/xerces-c/ fi - if [ ! -d "/opt/xerces-c/3.1.4" ]; then + if [[ ! -d "/opt/xerces-c/3.1.4" ]]; then sudo mkdir /opt/xerces-c/3.1.4 fi # 2. download: echo "Downloading xerces-c 3.1.4..." echo " " - cd $DOWNLOADS_FOLDER_FULLPATH >> "${_cwd}/prequisites.log" 2>&1 + cd "$DOWNLOADS_FOLDER_FULLPATH" wget http://archive.apache.org/dist/xerces/c/3/sources/xerces-c-3.1.4.tar.gz # 3. extract: - tar xvzf xerces-c-3.1.4.tar.gz >> "${_cwd}/prequisites.log" 2>&1 + tar xvzf xerces-c-3.1.4.tar.gz | tee -a "$_cwd/prerequisites.log" > /dev/null # 4. compile: echo "Building xerces-c (be patient)..." cd ./xerces-c-3.1.4 - ./configure --prefix=/opt/xerces-c/3.1.4 >> "${_cwd}/prequisites.log" 2>&1 - make -j >> "${_cwd}/prequisites.log" 2>&1 + ./configure --prefix=/opt/xerces-c/3.1.4 | tee -a "$_cwd/prerequisites.log" > /dev/null + make -j $(nproc) | tee -a "$_cwd/prerequisites.log" > /dev/null echo "Installing xerces-c to /opt/xerces-c/3.1.4..." - sudo make install >> "${_cwd}/prequisites.log" 2>&1 + sudo make install | tee -a "$_cwd/prerequisites.log" > /dev/null echo "Done." # Return to running directory - cd $_cwd + cd "$_cwd" # 5. cleanup - XERCES_TMP_FOLDER="${DOWNLOADS_FOLDER_FULLPATH}/xerces-c-3.1.4/" - XERCES_TMP_FILE="${DOWNLOADS_FOLDER_FULLPATH}/xerces-c-3.1.4.tar.gz" + XERCES_TMP_FOLDER="$DOWNLOADS_FOLDER_FULLPATH/xerces-c-3.1.4/" + XERCES_TMP_FILE="$DOWNLOADS_FOLDER_FULLPATH/xerces-c-3.1.4.tar.gz" echo "Cleaning up:" - echo " ${XERCES_TMP_FOLDER}" - echo " ${XERCES_TMP_FILE}" + echo " $XERCES_TMP_FOLDER" + echo " $XERCES_TMP_FILE" - if [ -d $XERCES_TMP_FOLDER ]; then - rm -Rf $XERCES_TMP_FOLDER + if [[ -d "$XERCES_TMP_FOLDER" ]]; then + rm -Rf "$XERCES_TMP_FOLDER" fi - if [ -e $XERCES_TMP_FILE ]; then - rm -f $XERCES_TMP_FILE + if [[ -e "$XERCES_TMP_FILE" ]]; then + rm -f "$XERCES_TMP_FILE" fi else @@ -447,14 +447,14 @@ echo -e "\n===================================================================== echo -e "Installation of Codesynthesis XSD: XML Data Binding for C++ (xsd)\n" # # determine how to install xsd -case ${_mode} in +case $_mode in 0) # interactive COLUMNS=1 PS3='Select which method to use to install xsd: ' - select opt in "Package manager (${_toolset})" "Download and install xsd to /opt" "Skip installation" + select opt in "Package manager ($_toolset)" "Download and install xsd to /opt" "Skip installation" do case $opt in - "Package manager (${_toolset})") + "Package manager ($_toolset)") break ;; "Download and install xsd to /opt") @@ -479,22 +479,22 @@ case ${_mode} in esac # Package manager -if [ ${REPLY} == 1 ]; then +if [[ $REPLY == 1 ]]; then echo " " - echo "Installing xsd via ${_toolset}..." + echo "Installing xsd via $_toolset..." echo "WARNING: DynAdjust has been developed with xsd version 4.0.0." echo " Later versions may cause compilation to fail." echo " " # Install xsd for rpm based distros (Fedora, CentOS, Red Hat, SUSE, OpenSUSE) - if [[ "${_format}" == "rpm" ]]; then - sudo ${_toolset} install xsd + if [[ "$_format" == "rpm" ]]; then + sudo $_toolset install xsd # Install xsd for deb based distros (Ubuntu, Debian) - elif [[ "${_format}" == "deb" ]]; then - sudo ${_toolset}-get install xsdcxx + elif [[ "$_format" == "deb" ]]; then + sudo "$_toolset-get" install xsdcxx else echo " " - echo "I don't know how to handle ${OSTYPE} or ${_distro} and am going to quit." + echo "I don't know how to handle $OSTYPE or $_distro and am going to quit." echo " " exit fi @@ -502,16 +502,16 @@ if [ ${REPLY} == 1 ]; then echo " " # Install from source -elif [ ${REPLY} == 2 ]; then +elif [[ $REPLY == 2 ]]; then echo " " echo "Installing xsd from source..." # 1. create install dir: - if [ ! -d "/opt/xsd" ]; then + if [[ ! -d "/opt/xsd" ]]; then sudo mkdir /opt/xsd fi - if [ ! -d $DOWNLOADS_FOLDER_FULLPATH ]; then + if [[ ! -d $DOWNLOADS_FOLDER_FULLPATH ]]; then mkdir $DOWNLOADS_FOLDER_FULLPATH fi @@ -519,35 +519,35 @@ elif [ ${REPLY} == 2 ]; then echo " " echo "Downloading and extracting xsd-4.0.0..." echo " " - cd $DOWNLOADS_FOLDER_FULLPATH >> "${_cwd}/prequisites.log" 2>&1 + cd "$DOWNLOADS_FOLDER_FULLPATH" wget https://www.codesynthesis.com/download/xsd/4.0/linux-gnu/x86_64/xsd-4.0.0-x86_64-linux-gnu.tar.bz2 # 3. extract: - tar xjf xsd-4.0.0-x86_64-linux-gnu.tar.bz2 >> "${_cwd}/prequisites.log" 2>&1 + tar xjf xsd-4.0.0-x86_64-linux-gnu.tar.bz2 | tee -a "$_cwd/prerequisites.log" > /dev/null # 4. move: echo "Moving xsd to /opt/xsd..." echo " " - sudo mv xsd-4.0.0-x86_64-linux-gnu /opt/xsd >> "${_cwd}/prequisites.log" 2>&1 + sudo mv xsd-4.0.0-x86_64-linux-gnu /opt/xsd | tee -a "$_cwd/prerequisites.log" > /dev/null # Return to running directory - cd $_cwd + cd "$_cwd" # 5. cleanup - XSD_TMP_FOLDER="${DOWNLOADS_FOLDER_FULLPATH}/xsd-4.0.0-x86_64-linux-gnu/" - XSD_TMP_FILE="${DOWNLOADS_FOLDER_FULLPATH}/xsd-4.0.0-x86_64-linux-gnu.tar.bz2" + XSD_TMP_FOLDER="$DOWNLOADS_FOLDER_FULLPATH/xsd-4.0.0-x86_64-linux-gnu/" + XSD_TMP_FILE="$DOWNLOADS_FOLDER_FULLPATH/xsd-4.0.0-x86_64-linux-gnu.tar.bz2" echo "Cleaning up:" - echo " ${XSD_TMP_FOLDER}" - echo " ${XSD_TMP_FILE}" + echo " $XSD_TMP_FOLDER" + echo " $XSD_TMP_FILE" - if [ -d $XSD_TMP_FOLDER ]; then - rm -Rf $XSD_TMP_FOLDER + if [[ -d "$XSD_TMP_FOLDER" ]]; then + rm -Rf "$XSD_TMP_FOLDER" fi - if [ -e $XSD_TMP_FILE ]; then - rm -f $XSD_TMP_FILE + if [[ -e "$XSD_TMP_FILE" ]]; then + rm -f "$XSD_TMP_FILE" fi else diff --git a/resources/make_dynadjust_gcc.sh b/resources/make_dynadjust_gcc.sh index e594152a..65e20ac5 100755 --- a/resources/make_dynadjust_gcc.sh +++ b/resources/make_dynadjust_gcc.sh @@ -24,12 +24,12 @@ _install=0 # default option is to install binaries # display example message function example { echo -e "examples:" - echo -e " $_script --auto --do-not-clone --test --no-install" + echo -e " ${_script} --auto --do-not-clone --test --no-install" } # display usage message function usage { - echo -e "usage: $_script [options]\n" + echo -e "usage: ${_script} [options]\n" } # display help message (calls usage and example) @@ -50,7 +50,7 @@ function help { ################################################################################# # get argument parameters -while [ "$1" != "" ]; +while [[ "$1" != "" ]]; do case $1 in -a | --auto ) shift @@ -72,7 +72,7 @@ do exit ;; *) - echo -e "\n$_script: illegal option $1" + echo -e "\n${_script}: illegal option $1" help exit 1 # error ;; @@ -88,23 +88,23 @@ else echo -e " - release variant." fi -if [ $_auto -eq 1 ]; then +if [[ $_auto -eq 1 ]]; then echo -e " - build automatically (no user input)." else echo -e " - run interactively (ask for user input)." fi -if [ $_clone -eq 1 ]; then +if [[ $_clone -eq 1 ]]; then echo -e " - do not clone a fresh copy from GitHub." else echo -e " - clone a fresh copy from GitHub." fi -if [ $_test -eq 1 ]; then +if [[ $_test -eq 1 ]]; then echo -e " - run tests." fi -if [ $_install -eq 1 ]; then +if [[ $_install -eq 1 ]]; then echo -e " - do not install." else echo -e " - install binaries to /opt/dynadjust/gcc/x_x_x." @@ -126,7 +126,7 @@ _clone_url="https://github.com/icsm-au/DynAdjust.git" # usr bin directory BIN_FOLDER="~/bin" -BIN_FOLDER_FULLPATH="`eval echo ${BIN_FOLDER//>}`" +eval BIN_FOLDER_FULLPATH="$BIN_FOLDER" # opt installation folder OPT_DYNADJUST_PATH=/opt/dynadjust @@ -137,25 +137,25 @@ DYNADJUST_INSTALL_PATH=/opt/dynadjust/gcc/1_0_3 _version="1.0.3" echo -e "\n===========================================================================" -echo -e "Build and installation of dynadjust ${_version}...\n" -if [ $_clone -eq 0 ]; then +echo -e "Build and installation of DynAdjust ${_version}...\n" +if [[ $_clone -eq 0 ]]; then echo "Repository settings:" echo " Git repo: ${_clone_url}" fi echo "Build settings:" echo " Current dir: ${_cwd}" -if [ $_clone -eq 0 ]; then +if [[ $_clone -eq 0 ]]; then echo " Clone dir: ${_clone_dir}" fi echo " Build dir: ${_build_dir}" -if [ $_install -eq 0 ]; then +if [[ $_install -eq 0 ]]; then echo "Installation settings:" echo " Install dir: ${DYNADJUST_INSTALL_PATH}" echo " User bin dir: ${BIN_FOLDER_FULLPATH}" fi -if [ $_test -eq 1 ]; then +if [[ $_test -eq 1 ]]; then echo "Test settings:" echo " Test dir: ${_test_dir}" fi @@ -179,32 +179,32 @@ fi # INSTALL DYNADJUST # 1. create install dirs: -if [ $_install -eq 0 ]; then - if [ ! -d "${BIN_FOLDER_FULLPATH}" ]; then +if [[ $_install -eq 0 ]]; then + if [[ ! -d "${BIN_FOLDER_FULLPATH}" ]]; then echo " " echo "Making ${BIN_FOLDER_FULLPATH}" - mkdir ${BIN_FOLDER_FULLPATH} + mkdir "${BIN_FOLDER_FULLPATH}" fi fi # 2. clone from GitHub: -if [ $_clone -eq 0 ]; then +if [[ $_clone -eq 0 ]]; then echo " " echo "Cloning DynAdjust..." git clone ${_clone_url} || echo -e "Okay, let's assume we already have a previously cloned version.\n" fi -if [ -d ${_build_dir} ]; then +if [[ -d "${_build_dir}" ]]; then echo "Cleaning out directory ${_build_dir}" - cd ${_build_dir} + cd "${_build_dir}" rm -rf CMakeCache.txt CMakeFiles cmake_install.cmake dynadjust Makefile - cd ${_cwd} + cd "${_cwd}" else echo "Creating new directory ${_build_dir}" mkdir ${_build_dir} fi -cd ${_build_dir} +cd "${_build_dir}" # 3. copy files: echo "Copying Find*.cmake files to build directory..." @@ -243,6 +243,9 @@ case ${_test} in cmake -DBUILD_TESTING="ON" -DCMAKE_BUILD_TYPE="${THIS_BUILD_TYPE}" .. || exit 1;; esac +echo -e "\n===========================================================================" +echo -e "Building DynAdjust ${_version}...\n" + make -j $(nproc) || exit 1 echo " " @@ -250,7 +253,7 @@ echo " " case ${_test} in 1) # run cmake tests echo -e "===========================================================================" - echo -e "Testing dynadjust ${_version}...\n" + echo -e "Testing DynAdjust ${_version}...\n" make CTEST_OUTPUT_ON_FAILURE=1 test;; esac @@ -263,7 +266,7 @@ case ${_auto} in *) # proceed without asking optresponse="y" # set install option - if [ $_install -eq 1 ]; then + if [[ $_install -eq 1 ]]; then optresponse="n" fi ;; @@ -282,96 +285,96 @@ else _lib_ext="dylib" fi - if [ ! -d $OPT_DYNADJUST_PATH ]; then + if [[ ! -d $OPT_DYNADJUST_PATH ]]; then sudo mkdir $OPT_DYNADJUST_PATH fi - if [ ! -d $OPT_DYNADJUST_GCC_PATH ]; then + if [[ ! -d $OPT_DYNADJUST_GCC_PATH ]]; then sudo mkdir $OPT_DYNADJUST_GCC_PATH fi - if [ ! -d $DYNADJUST_INSTALL_PATH ]; then + if [[ ! -d $DYNADJUST_INSTALL_PATH ]]; then sudo mkdir $DYNADJUST_INSTALL_PATH fi echo "Copying libraries and binaries to $DYNADJUST_INSTALL_PATH ..." - if [ -e "./dynadjust/dynadjust/dynadjust" ]; then - sudo cp ./dynadjust/dynadjust/dynadjust $DYNADJUST_INSTALL_PATH/ - ln -sf $DYNADJUST_INSTALL_PATH/dynadjust ${BIN_FOLDER_FULLPATH}/dynadjust + if [[ -e "./dynadjust/dynadjust/dynadjust" ]]; then + sudo cp ./dynadjust/dynadjust/dynadjust "$DYNADJUST_INSTALL_PATH/" + ln -sf "$DYNADJUST_INSTALL_PATH/dynadjust" "$BIN_FOLDER_FULLPATH/dynadjust" echo " - dynadjust" fi - if [ -e "./dynadjust/dnaadjustwrapper/dnaadjust" ]; then - sudo cp ./dynadjust/dnaadjust/libdnaadjust.$_lib_ext $DYNADJUST_INSTALL_PATH/ - sudo cp ./dynadjust/dnaadjustwrapper/dnaadjust $DYNADJUST_INSTALL_PATH/ - ln -sf $DYNADJUST_INSTALL_PATH/dnaadjust ${BIN_FOLDER_FULLPATH}/dnaadjust - ln -sf $DYNADJUST_INSTALL_PATH/libdnaadjust.$_lib_ext ${BIN_FOLDER_FULLPATH}/libdnaadjust.$_lib_ext - echo " - dnaadjust, libdnaadjust.${_lib_ext}" + if [[ -e "./dynadjust/dnaadjustwrapper/dnaadjust" ]]; then + sudo cp ./dynadjust/dnaadjust/libdnaadjust.$_lib_ext "$DYNADJUST_INSTALL_PATH/" + sudo cp ./dynadjust/dnaadjustwrapper/dnaadjust "$DYNADJUST_INSTALL_PATH/" + ln -sf "$DYNADJUST_INSTALL_PATH/dnaadjust" "$BIN_FOLDER_FULLPATH/dnaadjust" + ln -sf "$DYNADJUST_INSTALL_PATH/libdnaadjust.$_lib_ext" "$BIN_FOLDER_FULLPATH/libdnaadjust.$_lib_ext" + echo " - dnaadjust, libdnaadjust.$_lib_ext" fi - if [ -e "./dynadjust/dnaimportwrapper/dnaimport" ]; then - sudo cp ./dynadjust/dnaimport/libdnaimport.$_lib_ext $DYNADJUST_INSTALL_PATH/ - sudo cp ./dynadjust/dnaimportwrapper/dnaimport $DYNADJUST_INSTALL_PATH/ - ln -sf $DYNADJUST_INSTALL_PATH/dnaimport ${BIN_FOLDER_FULLPATH}/dnaimport - ln -sf $DYNADJUST_INSTALL_PATH/libdnaimport.$_lib_ext ${BIN_FOLDER_FULLPATH}/libdnaimport.$_lib_ext - echo " - dnaimport, libdnaimport.${_lib_ext}" + if [[ -e "./dynadjust/dnaimportwrapper/dnaimport" ]]; then + sudo cp ./dynadjust/dnaimport/libdnaimport.$_lib_ext "$DYNADJUST_INSTALL_PATH/" + sudo cp ./dynadjust/dnaimportwrapper/dnaimport "$DYNADJUST_INSTALL_PATH/" + ln -sf "$DYNADJUST_INSTALL_PATH/dnaimport" "$BIN_FOLDER_FULLPATH/dnaimport" + ln -sf "$DYNADJUST_INSTALL_PATH/libdnaimport.$_lib_ext" "$BIN_FOLDER_FULLPATH/libdnaimport.$_lib_ext" + echo " - dnaimport, libdnaimport.$_lib_ext" fi - if [ -e "./dynadjust/dnareftranwrapper/dnareftran" ]; then - sudo cp ./dynadjust/dnareftran/libdnareftran.$_lib_ext $DYNADJUST_INSTALL_PATH/ - sudo cp ./dynadjust/dnareftranwrapper/dnareftran $DYNADJUST_INSTALL_PATH/ - ln -sf $DYNADJUST_INSTALL_PATH/dnareftran ${BIN_FOLDER_FULLPATH}/dnareftran - ln -sf $DYNADJUST_INSTALL_PATH/libdnareftran.$_lib_ext ${BIN_FOLDER_FULLPATH}/libdnareftran.$_lib_ext - echo " - dnareftran, libdnareftran.${_lib_ext}" + if [[ -e "./dynadjust/dnareftranwrapper/dnareftran" ]]; then + sudo cp ./dynadjust/dnareftran/libdnareftran.$_lib_ext "$DYNADJUST_INSTALL_PATH/" + sudo cp ./dynadjust/dnareftranwrapper/dnareftran "$DYNADJUST_INSTALL_PATH/" + ln -sf "$DYNADJUST_INSTALL_PATH/dnareftran" "$BIN_FOLDER_FULLPATH/dnareftran" + ln -sf "$DYNADJUST_INSTALL_PATH/libdnareftran.$_lib_ext" "$BIN_FOLDER_FULLPATH/libdnareftran.$_lib_ext" + echo " - dnareftran, libdnareftran.$_lib_ext" fi - if [ -e "./dynadjust/dnageoidwrapper/dnageoid" ]; then - sudo cp ./dynadjust/dnageoid/libdnageoid.$_lib_ext $DYNADJUST_INSTALL_PATH/ - sudo cp ./dynadjust/dnageoidwrapper/dnageoid $DYNADJUST_INSTALL_PATH/ - ln -sf $DYNADJUST_INSTALL_PATH/dnageoid ${BIN_FOLDER_FULLPATH}/dnageoid - ln -sf $DYNADJUST_INSTALL_PATH/libdnageoid.$_lib_ext ${BIN_FOLDER_FULLPATH}/libdnageoid.$_lib_ext - echo " - dnageoid, libdnageoid.${_lib_ext}" + if [[ -e "./dynadjust/dnageoidwrapper/dnageoid" ]]; then + sudo cp ./dynadjust/dnageoid/libdnageoid.$_lib_ext "$DYNADJUST_INSTALL_PATH/" + sudo cp ./dynadjust/dnageoidwrapper/dnageoid "$DYNADJUST_INSTALL_PATH/" + ln -sf "$DYNADJUST_INSTALL_PATH/dnageoid" "$BIN_FOLDER_FULLPATH/dnageoid" + ln -sf "$DYNADJUST_INSTALL_PATH/libdnageoid.$_lib_ext" "$BIN_FOLDER_FULLPATH/libdnageoid.$_lib_ext" + echo " - dnageoid, libdnageoid.$_lib_ext" fi - if [ -e "./dynadjust/dnasegmentwrapper/dnasegment" ]; then - sudo cp ./dynadjust/dnasegment/libdnasegment.$_lib_ext $DYNADJUST_INSTALL_PATH/ - sudo cp ./dynadjust/dnasegmentwrapper/dnasegment $DYNADJUST_INSTALL_PATH/ - ln -sf $DYNADJUST_INSTALL_PATH/dnasegment ${BIN_FOLDER_FULLPATH}/dnasegment - ln -sf $DYNADJUST_INSTALL_PATH/libdnasegment.$_lib_ext ${BIN_FOLDER_FULLPATH}/libdnasegment.$_lib_ext - echo " - dnasegment, libdnasegment.${_lib_ext}" + if [[ -e "./dynadjust/dnasegmentwrapper/dnasegment" ]]; then + sudo cp ./dynadjust/dnasegment/libdnasegment.$_lib_ext "$DYNADJUST_INSTALL_PATH/" + sudo cp ./dynadjust/dnasegmentwrapper/dnasegment "$DYNADJUST_INSTALL_PATH/" + ln -sf "$DYNADJUST_INSTALL_PATH/dnasegment" "$BIN_FOLDER_FULLPATH/dnasegment" + ln -sf "$DYNADJUST_INSTALL_PATH/libdnasegment.$_lib_ext" "$BIN_FOLDER_FULLPATH/libdnasegment.$_lib_ext" + echo " - dnasegment, libdnasegment.$_lib_ext" fi - if [ -e "./dynadjust/dnaplotwrapper/dnaplot" ]; then - sudo cp ./dynadjust/dnaplot/libdnaplot.$_lib_ext $DYNADJUST_INSTALL_PATH/ - sudo cp ./dynadjust/dnaplotwrapper/dnaplot $DYNADJUST_INSTALL_PATH/ - ln -sf $DYNADJUST_INSTALL_PATH/dnaplot ${BIN_FOLDER_FULLPATH}/dnaplot - ln -sf $DYNADJUST_INSTALL_PATH/libdnaplot.$_lib_ext ${BIN_FOLDER_FULLPATH}/libdnaplot.$_lib_ext - echo " - dnaplot, libdnaplot.${_lib_ext}" + if [[ -e "./dynadjust/dnaplotwrapper/dnaplot" ]]; then + sudo cp ./dynadjust/dnaplot/libdnaplot.$_lib_ext "$DYNADJUST_INSTALL_PATH/" + sudo cp ./dynadjust/dnaplotwrapper/dnaplot "$DYNADJUST_INSTALL_PATH/" + ln -sf "$DYNADJUST_INSTALL_PATH/dnaplot" "$BIN_FOLDER_FULLPATH/dnaplot" + ln -sf "$DYNADJUST_INSTALL_PATH/libdnaplot.$_lib_ext" "$BIN_FOLDER_FULLPATH/libdnaplot.$_lib_ext" + echo " - dnaplot, libdnaplot.$_lib_ext" fi echo "Creating symbolic links to libraries and binaries in $DYNADJUST_INSTALL_PATH ..." - sudo ln -sf $DYNADJUST_INSTALL_PATH/libdnaimport.$_lib_ext /opt/dynadjust/libdnaimport.$_lib_ext - sudo ln -sf $DYNADJUST_INSTALL_PATH/libdnareftran.$_lib_ext /opt/dynadjust/libdnareftran.$_lib_ext - sudo ln -sf $DYNADJUST_INSTALL_PATH/libdnageoid.$_lib_ext /opt/dynadjust/libdnageoid.$_lib_ext - sudo ln -sf $DYNADJUST_INSTALL_PATH/libdnasegment.$_lib_ext /opt/dynadjust/libdnasegment.$_lib_ext - sudo ln -sf $DYNADJUST_INSTALL_PATH/libdnaadjust.$_lib_ext /opt/dynadjust/libdnaadjust.$_lib_ext - sudo ln -sf $DYNADJUST_INSTALL_PATH/libdnaplot.$_lib_ext /opt/dynadjust/libdnaplot.$_lib_ext - - sudo ln -sf $DYNADJUST_INSTALL_PATH/dnaimport /opt/dynadjust/dnaimport - sudo ln -sf $DYNADJUST_INSTALL_PATH/dnareftran /opt/dynadjust/dnareftran - sudo ln -sf $DYNADJUST_INSTALL_PATH/dnageoid /opt/dynadjust/dnageoid - sudo ln -sf $DYNADJUST_INSTALL_PATH/dnasegment /opt/dynadjust/dnasegment - sudo ln -sf $DYNADJUST_INSTALL_PATH/dnaadjust /opt/dynadjust/dnaadjust - sudo ln -sf $DYNADJUST_INSTALL_PATH/dnaplot /opt/dynadjust/dnaplot - sudo ln -sf $DYNADJUST_INSTALL_PATH/dynadjust /opt/dynadjust/dynadjust + sudo ln -sf "$DYNADJUST_INSTALL_PATH/libdnaimport.$_lib_ext" /opt/dynadjust/libdnaimport.$_lib_ext + sudo ln -sf "$DYNADJUST_INSTALL_PATH/libdnareftran.$_lib_ext" /opt/dynadjust/libdnareftran.$_lib_ext + sudo ln -sf "$DYNADJUST_INSTALL_PATH/libdnageoid.$_lib_ext" /opt/dynadjust/libdnageoid.$_lib_ext + sudo ln -sf "$DYNADJUST_INSTALL_PATH/libdnasegment.$_lib_ext" /opt/dynadjust/libdnasegment.$_lib_ext + sudo ln -sf "$DYNADJUST_INSTALL_PATH/libdnaadjust.$_lib_ext" /opt/dynadjust/libdnaadjust.$_lib_ext + sudo ln -sf "$DYNADJUST_INSTALL_PATH/libdnaplot.$_lib_ext" /opt/dynadjust/libdnaplot.$_lib_ext + + sudo ln -sf "$DYNADJUST_INSTALL_PATH/dnaimport" /opt/dynadjust/dnaimport + sudo ln -sf "$DYNADJUST_INSTALL_PATH/dnareftran" /opt/dynadjust/dnareftran + sudo ln -sf "$DYNADJUST_INSTALL_PATH/dnageoid" /opt/dynadjust/dnageoid + sudo ln -sf "$DYNADJUST_INSTALL_PATH/dnasegment" /opt/dynadjust/dnasegment + sudo ln -sf "$DYNADJUST_INSTALL_PATH/dnaadjust" /opt/dynadjust/dnaadjust + sudo ln -sf "$DYNADJUST_INSTALL_PATH/dnaplot" /opt/dynadjust/dnaplot + sudo ln -sf "$DYNADJUST_INSTALL_PATH/dynadjust" /opt/dynadjust/dynadjust fi echo "Done." echo " " -if [ $_install -eq 0 ]; then +if [[ $_install -eq 0 ]]; then echo "Don't forget to add the bin directory to path in ~/.bash_profile" echo "For example:" echo " EXPORT PATH=$PATH:$HOME/bin" diff --git a/resources/prepare_build.sh b/resources/prepare_build.sh index f5c04de9..53698e3c 100755 --- a/resources/prepare_build.sh +++ b/resources/prepare_build.sh @@ -10,30 +10,30 @@ _cwd="$PWD" # set dynadjust clone dir -_clone_dir="${_cwd}" +_clone_dir="$_cwd" # set dynadjust root dir -_root_dir="${_clone_dir}/dynadjust" +_root_dir="$_clone_dir/dynadjust" # set build dir -_build_dir="${_root_dir}/build_gcc" +_build_dir="$_root_dir/build_gcc" echo " " -echo "Current directory: ${_clone_dir}" -echo "Root directory: ${_root_dir}" -echo "Build directory: ${_build_dir}" +echo "Current directory: $_clone_dir" +echo "Root directory: $_root_dir" +echo "Build directory: $_build_dir" echo " " # 1. create build dir: -if [ -d ${_build_dir} ]; then - echo "Cleaning out directory ${_build_dir}" - cd ${_build_dir} +if [[ -d "$_build_dir" ]]; then + echo "Cleaning out directory $_build_dir" + cd "$_build_dir" rm -rf CMakeCache.txt CMakeFiles cmake_install.cmake dynadjust Makefile - cd ${_cwd} + cd "$_cwd" else - echo "Creating new directory ${_build_dir}" - mkdir ${_build_dir} + echo "Creating new directory $_build_dir" + mkdir "$_build_dir" fi -cd ${_build_dir} +cd "$_build_dir" # 2. copy files: echo "Copying Find...cmake files to build directory..." diff --git a/sampleData/run-gnss-network.sh b/sampleData/run-gnss-network.sh index 424781b3..3eab2bc5 100755 --- a/sampleData/run-gnss-network.sh +++ b/sampleData/run-gnss-network.sh @@ -1,3 +1,5 @@ +#! /bin/bash + # Script to automate processing of a GNSS network using simultaneous mode dnaimport -n gnss gnss-network.stn gnss-network.msr dnageoid gnss -g gnss-network-geoid.gsb --convert-stn-hts @@ -9,6 +11,6 @@ diff <(tail -n +53 gnss.simult.adj) <(tail -n +53 gnss.simult.adj.expected) > /d rv=$? # Clean up -rm *.bms *.bst *.map *.imp *.adj *.xyz *.dbid *.dnaproj *.mtx *.aml *.asl +rm ./*.bms ./*.bst ./*.map ./*.imp ./*.adj ./*.xyz ./*.dbid ./*.dnaproj ./*.mtx ./*.aml ./*.asl exit $rv diff --git a/sampleData/run-urban-network.sh b/sampleData/run-urban-network.sh index 09fbf0a2..482a3e7f 100755 --- a/sampleData/run-urban-network.sh +++ b/sampleData/run-urban-network.sh @@ -1,3 +1,5 @@ +#! /bin/bash + # Script to automate processing of urban survey control network using phased adjustment dnaimport -n urban urban-network.stn urban-network.msr dnageoid urban -g urban-network-geoid.gsb --convert-stn-hts @@ -10,6 +12,6 @@ diff <(tail -n +62 urban.phased.adj) <(tail -n +62 urban.phased.adj.expected) > rv=$? # Clean up -rm *.bms *.bst *.seg *.map *.imp *.adj *.xyz *.dbid *.dnaproj *.mtx *.aml *.asl +rm ./*.bms ./*.bst ./*.seg ./*.map ./*.imp ./*.adj ./*.xyz ./*.dbid ./*.dnaproj ./*.mtx ./*.aml ./*.asl exit $rv