[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: CVS update: execwrapper



  User: ahvezda 
  Date: 06/11/05 23:38:15

  Added:       .        execwrapper install.sh
  Log:
  Lots of work on buildgeda scripts
  
  
  
  
  Revision  Changes    Path
  1.1                  eda/geda/buildgeda/scripts/execwrapper
  
  Index: execwrapper
  ===================================================================
  #!/bin/sh
  
  installdir=%INSTALLDIR%
  
  export LD_LIBRARY_PATH=$installdir/lib:$LD_LIBRARY_PATH
  export PATH=$installdir/bin:$PATH
  export GEDADATA=$installdir/share/gEDA
  
  export GDK_PIXBUF_MODULE_FILE=$installdir/etc/gtk-2.0/gdk-pixbuf.loaders
  export GTK_IM_MODULE_FILE=$installdir/etc/gtk-2.0/gtk.immodules
  export GTK2_RC_FILES=$installdir/etc/gtk-2.0/gtkrc
  export GTK_PATH=$installdir/lib/gtk-2.0/2.4.0
  
  export PANGO_RC_FILE=$installdir/etc/pango/pangorc
  export FONTCONFIG_PATH=$installdir/etc/fonts
  
  export GUILE_LOAD_PATH=$installdir/share/guile/1.6
  
  # For debug purposes only
  # ldd $0.x 
  # For debug purposes only
  
  
  exec $0.x $*
  
  
  
  1.1                  eda/geda/buildgeda/scripts/install.sh
  
  Index: install.sh
  ===================================================================
  #!/bin/sh
  
  version=%VERSION%
  
  echo "Welcome to the gEDA Suite Binary Installer"
  echo ""
  echo "Enter install directory ($HOME/geda-$version)"
  echo -n "> "
  read installdir
  
  if [ "$installdir" = "" ]
  then
  	installdir="$HOME/geda-$version"
  fi
  
  echo ""
  echo "Install directory: $installdir"
  echo ""
  
  if [ -e "$installdir" ]
  then
  	echo "$installdir already exists.  Please remove it and rerun this script"
  	echo ""
  	exit 1
  fi
  
  if [ ! -d "$installdir" ]
  then
  	echo "$installdir does not exist.  Create $installdir (y) ?"
  	echo -n "> " 
  	read createinstalldir
  
  	if [ "$createinstalldir" = "" ]
  	then
  		createinstalldir=y
  	fi
  
  	if [ "$createinstalldir" != "y" ]
  	then
  		echo "You must allow me to create $installdir"
  		echo "I am now exiting... Bye!"
  		exit 1
  	fi
  fi
  
  echo ""
  echo "Are you sure you wish to install the gEDA Suite binaries (y)?"
  echo -n "> "
  read verify
  
  if [ "$verify" = "" ]
  then
  	verify=y
  fi
  
  if [ "$verify" != "y" ]
  then
  	echo ""
  	echo "Okay, I will not install the gEDA Suite binaries. Bye!"
  	exit 1
  fi
  
  fixupfiles="%FIXUPFILES%"
  
  echo "Creating $installdir"
  mkdir -p $installdir 
  status=$?
  if [ "$status" != 0 ]
  then
  	echo "Creation of $installdir failed!"
  	echo "Exiting... Bye!"
  	exit 1
  fi
  
  echo "Installing files..."
  cp -rp dist/* $installdir
  status=$?
  if [ "$status" != 0 ]
  then
  	echo "Some files did not install correctly"
  	echo "Exiting... Bye!"
  	exit 1
  fi
  
  cd $installdir
  echo "Performing post install setup..."
  for i in $fixupfiles
  do
  	mv $i $i.orig
  	cat $i.orig | sed "s^%INSTALLDIR%^$installdir^g" > $i
  
  	insidebin=`echo $i | grep bin`
  	if [ "$insidebin" != "" ]
  	then
  		chmod 755 $i
  	fi
  done
  
  
  
  


_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs