-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprun.sh
More file actions
37 lines (33 loc) · 707 Bytes
/
prun.sh
File metadata and controls
37 lines (33 loc) · 707 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
#
# Apache License 2.0
#
# Author: Jan Mutter (info@jayefem.de), 2017-2019
#
# Modify pcd.config for configuration
#
if test -n "$ZSH_VERSION"; then
PROFILE_SHELL=zsh
elif test -n "$BASH_VERSION"; then
PROFILE_SHELL=bash
elif test -n "$KSH_VERSION"; then
PROFILE_SHELL=ksh
elif test -n "$FCEDIT"; then
PROFILE_SHELL=ksh
elif test -n "$PS3"; then
PROFILE_SHELL=unknown
else
PROFILE_SHELL=sh
fi
MY_DIR=""
MY_EXEC_NAME="run"
if [[ "$PROFILE_SHELL" == "zsh" ]]; then
MY_PATH=$(where pcd.sh)
MY_DIR=`dirname $MY_PATH`/
elif [[ "$PROFILE_SHELL" == "bash" ]]; then
if [[ ! "$0" =~ "bash" ]]; then
# If not called from alias
MY_DIR=`dirname $0`/
fi
fi
source ${MY_DIR}pexecute.sh