mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
43 lines
1.2 KiB
Bash
43 lines
1.2 KiB
Bash
#!/usr/bin/env bash
|
|
#------------------------------------------------------------------------------
|
|
# Bash+ - Modern Bash Programming
|
|
#
|
|
# Copyright (c) 2013-2016 Ingy döt Net
|
|
#------------------------------------------------------------------------------
|
|
|
|
set -e
|
|
shopt -s compat31&>/dev/null||:
|
|
|
|
#------------------------------------------------------------------------------
|
|
# Determine how `bash+` was called, and do the right thing:
|
|
#------------------------------------------------------------------------------
|
|
if [ "${BASH_SOURCE[0]}" != "$0" ]; then
|
|
# 'bash+' is being sourced:
|
|
[[ "${BASH_SOURCE[0]}" =~ /bin/bash\\+$ ]] || {
|
|
echo "Invalid Bash+ path '${BASH_SOURCE[0]}'" 2> /dev/null
|
|
exit 1
|
|
}
|
|
source "${BASH_SOURCE[0]%/bin/*}"/lib/bash+.bash || return $?
|
|
bash+:import "$@"
|
|
return $?
|
|
else
|
|
if [ $# -eq 1 -a "$1" == --version ]; then
|
|
echo 'bash+ version 0.0.7'
|
|
else
|
|
cat <<...
|
|
|
|
Greetings modern Bash programmer. Welcome to Bash+!
|
|
|
|
Bash+ is framework that makes Bash programming more like Ruby and Perl.
|
|
|
|
See: https://github.com/bpan-org/bashplus
|
|
|
|
If you got here trying to use bash+ in a program, you need to source it:
|
|
|
|
source bash+
|
|
|
|
Happy Bash Hacking!
|
|
|
|
...
|
|
fi
|
|
fi
|