Softice-net-setup

From SOFTICE

Jump to: navigation, search


Developed by:

Synopsis

This script is located at /home/sys/net/bin/softice-net-setup. It sets up the MLN environment for the account that executes it.

File

#!/bin/bash

# setup new MLN users
# written by Matt Rideout mrideout *at* windserve *dot* com

cd ~ # change to home directory

# update $PATH at login
if [ `cat .bash_profile | grep 'PATH=/home/sys/net/bin:"${PATH}"'` ]; then
        echo '/home/sys/net/bin is already included in your PATH at login.'
else
        echo "" >> .bash_profile
        echo "if [ -d /home/sys/net/bin ] ; then" >> .bash_profile
        echo '    PATH=/home/sys/net/bin:"${PATH}"' >> .bash_profile
        echo "fi"  >> .bash_profile
        echo '/home/sys/net/bin is now included in your PATH at login. To activate, you can logout, then back in.'
        echo ""
fi

# configure .mln
if [ -f .mln ] ; then
        echo ".mln configuration file already exists - not modifying."
else
        echo "templates /home/sys/net/mln/templates" >> .mln
        echo "files $HOME/mln/files/$USER" >> .mln
        echo "projects $HOME/mln/projects" >> .mln
        echo "uml $HOME/mln/uml" >> .mln
        echo "default_kernel /home/sys/net/bin/linux-2.6.18.1/linux" >> .mln
        echo "default_modules /home/sys/net/bin/linux-2.6.18.1" >> .mln
        echo "Finished setting up .mln configuration file."
fi

if [ -d mln ] ; then
        echo "mln directory already exists - not populating."
else
        mkdir -p mln/files/$USER mln/projects mln/uml
        ln -s /home/sys/net/mln/mln_files mln/mln_files
        echo "Finished populating mln directory."
fi
Personal tools