Newer
Older

Tony Zorman
committed
#!/bin/bash
echo "zusätzlich zu OPAL liegen nützliche Dateien in https://gitlab.mn.tu-dresden.de/wwalter/PROG-material-public"

Felix Hilsky
committed
echo "gedit settings:"
gsettings set org.gnome.gedit.preferences.editor tabs-size 2
echo "tabs-size"
gsettings set org.gnome.gedit.preferences.editor insert-spaces true
echo "insert-spaces"
gsettings set org.gnome.gedit.preferences.editor display-right-margin true
echo "display margin"
gsettings set org.gnome.gedit.preferences.editor right-margin-position 70
echo "margin position"
gsettings set org.gnome.gedit.preferences.editor auto-indent true
echo "auto indent"
gsettings set org.gnome.gedit.preferences.editor display-line-numbers true
echo "display l nr"

Tony Zorman
committed
echo "frun <Programm> <Eingabe> <noetige Module> ist ein neuer Befehl, der ein Fortran-Programm kompiliert und ausfuehrt. Es steht zur Verfügung, sobald du eine neue Shell startest, z.B. mit Ctrl+Alt+T."

Felix Hilsky
committed
mkdir --parents ~/zih_home/bin

Felix Hilsky
committed
echo '#! /bin/sh
if test -z "$1"; then

Tony Zorman
committed
echo "Dieses kleine Programm kompiliert ein f95-Programm (der Form <Programm> [<Eingabe>] [<Module>]) mit mehreren hilfreichen Optionen und führt es aus"

Felix Hilsky
committed
exit 1
fi
# Remove suffix.
# Also works when main program is given without the .f95 ending.
# This is done for backwards compatability reasons.

Tony Zorman
committed
*f95 ) outfile="${1%.*}"
programm="$outfile.f95"
if (( $# > 1 )) && test "$2" == *f95; then
shift
module="$@"
echo "genutzte Module: "$module
echo "Fortran-Hauptprogramm: "$programm
echo "Maschinenprogramm: "$outfile
f95 $module "$programm" -o "$outfile" -std=f95 -Wall -fmax-errors=3 -fcheck=all && "./$outfile"
elif (( $# > 1)); then
eingabe="$2"
shift
shift
module="$@"
echo "genutzte Module: "$module
echo "Fortran-Hauptprogramm: "$programm
echo "Maschinenprogramm: "$outfile
f95 $module "$programm" -o "$outfile" -std=f95 -Wall -fmax-errors=3 -fcheck=all && echo "$eingabe" | "./$outfile"
echo "Fortran-Hauptprogramm: "$programm
echo "Maschinenprogramm: "$outfile
f95 $module "$programm" -o "$outfile" -std=f95 -Wall -fmax-errors=3 -fcheck=all && "./$outfile"
fi' > ~/zih_home/bin/frun
chmod a+rwx ~/zih_home/bin/frun