-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdirect_test.sh
More file actions
executable file
·32 lines (29 loc) · 732 Bytes
/
direct_test.sh
File metadata and controls
executable file
·32 lines (29 loc) · 732 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
# This file is not intended for direct execution
if [ -n "$ZSH_VERSION" ]; then
case $ZSH_EVAL_CONTEXT in
*file)
;;
*file:cmdsubst)
;;
*)
echo 'This script is not intended for direct Zsh execution'
exit
;;
esac
elif [ -n "$BASH_VERSION" ]; then
if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
echo 'This script is not intended for direct bash execution'
exit
fi
else
# Only Zsh and Bash supported
echo 'This script requires Zsh or Bash'
exit
fi
__direct_test_main() {
eval "$(__sh_color_definitions)"
eval "$(__sh_os_definitions)"
echo -e $COLOR_GREEN'Success'$COLOR_NONE
}
__direct_test_main "$@"
unset -f __direct_test_main