Skip to content
Snippets Groups Projects
Commit 1c6f5c17 authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

Resolve "Update sigils when using one of the pre-packaged detectors"

parent c81a0d11
Branches
Tags
1 merge request!194Resolve "Update sigils when using one of the pre-packaged detectors"
...@@ -25,15 +25,16 @@ if [ -f /etc/jug_info ]; then ...@@ -25,15 +25,16 @@ if [ -f /etc/jug_info ]; then
*testing*) sigil="*" ;; *testing*) sigil="*" ;;
*) sigil="+" ;; *) sigil="+" ;;
esac esac
PS1_PREAMBLE="${container}${sigil}> " ps1_preamble="${container}${sigil}> "
unset sigil export PS1_SIGIL=${sigil}
unset ${sigil}
fi fi
unset version unset version
unset container unset container
fi fi
export PS1=${PS1_PREAMBLE}'\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' export PS1=${ps1_preamble}'\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
export LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33' export LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33'
unset PS1_PREAMBLE unset ps1_preamble
## redefine ls and less as functions, as this is something we ## redefine ls and less as functions, as this is something we
## can import into our plain bash --norc --noprofile session ## can import into our plain bash --norc --noprofile session
......
...@@ -18,7 +18,12 @@ export JUGGLER_DETECTOR_VERSION=$DETECTOR_VERSION ...@@ -18,7 +18,12 @@ export JUGGLER_DETECTOR_VERSION=$DETECTOR_VERSION
export JUGGLER_DETECTOR_PATH=$DETECTOR_PATH export JUGGLER_DETECTOR_PATH=$DETECTOR_PATH
export JUGGLER_BEAMLINE_CONFIG=$BEAMLINE_CONFIG export JUGGLER_BEAMLINE_CONFIG=$BEAMLINE_CONFIG
export JUGGLER_BEAMLINE_CONFIG_VERSION=$BEAMLINE_CONFIG_VERSION export JUGGLER_BEAMLINE_CONFIG_VERSION=$BEAMLINE_CONFIG_VERSION
export JUGGLER_INSTALL_PREFIX=/usr/local''' export JUGGLER_INSTALL_PREFIX=/usr/local
## modify PS1 for this detector version
export PS1="{branch}${{PS1_SIGIL}}>${{PS1#*>}}"
unset branch
'''
if __name__ == '__main__': if __name__ == '__main__':
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
...@@ -135,7 +140,8 @@ if __name__ == '__main__': ...@@ -135,7 +140,8 @@ if __name__ == '__main__':
data_prefix=data_dir, data_prefix=data_dir,
version=cfg['version'], version=cfg['version'],
ip=ip['config'], ip=ip['config'],
ip_version=ip['version']), ip_version=ip['version'],
branch=branch),
file=f) file=f)
print(' --> Symlinking default detector for backward compatibility') print(' --> Symlinking default detector for backward compatibility')
full_prefix='{}/{}-{}'.format(args.prefix, default_detector, default_version) full_prefix='{}/{}-{}'.format(args.prefix, default_detector, default_version)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment