mirror of https://gitlab.com/QEF/q-e.git
82 lines
2.3 KiB
Bash
Executable File
82 lines
2.3 KiB
Bash
Executable File
#!/bin/sh
|
|
# ----------------------------------------------------------------------
|
|
# PROGRAM: PWgui
|
|
# PURPOSE: tries to be a GUI for the PWscf
|
|
# ----------------------------------------------------------------------
|
|
# Anton Kokalj
|
|
# Jozef Stefan Institute, Ljubljana, Slovenia
|
|
# INFM DEMOCRITOS National Simulation Center, Trieste, Italy
|
|
# Email: Tone.Kokalj@ijs.si
|
|
# ======================================================================
|
|
# Copyright (c) 2003--2004 Anton Kokalj
|
|
# ======================================================================
|
|
#
|
|
#
|
|
# This file is distributed under the terms of the GNU General Public
|
|
# License. See the file `COPYING' in the root directory of the present
|
|
# distribution, or http://www.gnu.org/copyleft/gpl.txt .
|
|
#
|
|
#
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
# NONINFRINGEMENT. IN NO EVENT SHALL ANTON KOKALJ BE LIABLE FOR ANY
|
|
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
#
|
|
|
|
#------------------------------------------------------------------------
|
|
# please edit this line to point to your ActiveTcl8.4's tclsh binary
|
|
#
|
|
ACTIVE_TCL=/opt/ActiveTcl-8.4/bin/tclsh8.4
|
|
#________________________________________________________________________
|
|
|
|
|
|
if test "x`type readlink`" = "x"; then
|
|
# no readlink cmd; make a function-substitute
|
|
readlink() {
|
|
echo `ls -l $1 | awk '{print $NF}'`
|
|
}
|
|
fi
|
|
|
|
pathname() {
|
|
file=`type -p $1`
|
|
if test $? -gt 0; then
|
|
file=`which $1`
|
|
if test $? -gt 0; then
|
|
# give-up
|
|
file=$1
|
|
fi
|
|
fi
|
|
echo $file
|
|
}
|
|
|
|
pathdir() {
|
|
file=`pathname $1`
|
|
|
|
while test -h $file; do
|
|
file=`readlink $file`
|
|
done
|
|
|
|
dir=`dirname $file`
|
|
( cd $dir; pwd )
|
|
}
|
|
|
|
if [ -z "$PWGUI" ]; then
|
|
# try to guess the PWGUI value
|
|
export PWGUI=`pathdir $0`
|
|
fi
|
|
|
|
|
|
echo "
|
|
==================================================
|
|
This is PWGUI version: `cat $PWGUI/VERSION`
|
|
--------------------------------------------------
|
|
"
|
|
|
|
echo "
|
|
PWGUI: using the \"$ACTIVE_TCL\" interpreter
|
|
"
|
|
$ACTIVE_TCL $PWGUI/pwgui.tcl
|