Fix --editor-config
This commit is contained in:
parent
4763f4038a
commit
2f2655b0db
9
msman.sh
9
msman.sh
@ -466,14 +466,15 @@ if [[ "$1" == "--redownload" ]] || [[ "$1" == "-r" ]]; then
|
|||||||
exec "$0"
|
exec "$0"
|
||||||
exit 0
|
exit 0
|
||||||
elif [[ "$1" == "--edit-config" ]] || [[ "$1" == "-e" ]]; then
|
elif [[ "$1" == "--edit-config" ]] || [[ "$1" == "-e" ]]; then
|
||||||
if command -v $EDITOR &> /dev/null
|
if ! command -v $EDITOR &> /dev/null
|
||||||
then
|
then
|
||||||
$EDITOR msman.cfg
|
|
||||||
else
|
|
||||||
echo "EDITOR is not set."
|
echo "EDITOR is not set."
|
||||||
echo "Open 'msman.cfg' manually."
|
echo "Open 'msman.cfg' manually."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
$EDITOR msman.cfg
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
exit 1
|
|
||||||
elif [[ "$1" == "--help" ]] || [[ "$1" == "-h" ]]; then
|
elif [[ "$1" == "--help" ]] || [[ "$1" == "-h" ]]; then
|
||||||
echo "Usage: ./script.sh [OPTION]"
|
echo "Usage: ./script.sh [OPTION]"
|
||||||
echo "Starts the Minecraft server."
|
echo "Starts the Minecraft server."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user