Skip to content

Commit

Permalink
Added future check functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Dashboy1998 committed Jan 31, 2024
1 parent 3f84214 commit 85d1cdb
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,24 @@ isBoolean() {
[ "${bool,,}" = true ] || [ "${bool,,}" = false ]
}

# Future use
isUint() {
local bool="$1"
[[ "${bool}" =~ ^[0-9]+$ ]]
}

# Future use
isNetworkPort() {
local bool="$1"
isUint "${bool}" && [ "${bool}" -ge 0 ] && [ "${bool}" -le 65535 ]
}

# Future use
isUFloat() {
local bool="$1"
[[ "${bool}" =~ ^[0-9]+([.][0-9]+)?$ ]]
}

dirExists "/palworld" || exit
isWritable "/palworld" || exit
isExecutable "/palworld" || exit
Expand Down

0 comments on commit 85d1cdb

Please sign in to comment.