Merge branch '1-add-support-for-openbsd-in-autoattach-script' into 'master'
Resolve "Add support for OpenBSD in autoattach script." Closes #1 See merge request lhprojects-information-network/scripts!1
This commit is contained in:
commit
96619c8183
14
autoattach
14
autoattach
|
@ -27,8 +27,8 @@ function attach_session
|
||||||
if [ $? -gt 0 ]; then
|
if [ $? -gt 0 ]; then
|
||||||
echo "There is no tmux session '$1'"
|
echo "There is no tmux session '$1'"
|
||||||
if [ -z "${AUTO_CREATE}" ]; then
|
if [ -z "${AUTO_CREATE}" ]; then
|
||||||
read -p "Do you want me to auto create sessions by default? (y/n): "
|
read -p "Do you want me to auto create sessions by default? [Y/n]: "
|
||||||
if [ "${REPLY}" = "y" ]; then
|
if [ "${REPLY}" = "y" -o -z "${REPLY}" ]; then
|
||||||
write_setting 'AUTO_CREATE' '1'
|
write_setting 'AUTO_CREATE' '1'
|
||||||
AUTO_CREATE=1
|
AUTO_CREATE=1
|
||||||
else
|
else
|
||||||
|
@ -66,13 +66,15 @@ function usage
|
||||||
test -f $CONF_FILE && . $CONF_FILE
|
test -f $CONF_FILE && . $CONF_FILE
|
||||||
|
|
||||||
# Detect platform
|
# Detect platform
|
||||||
case "$OSTYPE" in
|
PLATFORM='unknown'
|
||||||
freebsd* )
|
unamestr=$(uname)
|
||||||
echo "Freebsb detected!!"
|
case "$unamestr" in
|
||||||
|
OpenBSD* )
|
||||||
|
echo "*BSD OS detected!!"
|
||||||
echo "Long options is disabled!!"
|
echo "Long options is disabled!!"
|
||||||
OPTS=`getopt chgs: $*`
|
OPTS=`getopt chgs: $*`
|
||||||
set_opts_exit_status=$?
|
set_opts_exit_status=$?
|
||||||
PLATFORM='Freebsd' ;;
|
PLATFORM=$unamestr ;;
|
||||||
#if [ $? -ne 0 ]; then
|
#if [ $? -ne 0 ]; then
|
||||||
# echo 'Usage: ...'
|
# echo 'Usage: ...'
|
||||||
# exit 2
|
# exit 2
|
||||||
|
|
Loading…
Reference in New Issue