2016-11-30 17:45:05 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-12-03 18:46:01 +01:00
|
|
|
#=================================================
|
|
|
|
# COMMON VARIABLES
|
|
|
|
#=================================================
|
|
|
|
|
2019-05-28 00:28:01 +02:00
|
|
|
#=================================================
|
|
|
|
# PERSONAL HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
2018-09-30 11:50:17 +02:00
|
|
|
#=================================================
|
|
|
|
# BOOLEAN CONVERTER
|
|
|
|
#=================================================
|
|
|
|
|
2024-02-14 13:31:37 +01:00
|
|
|
bool_to_01() {
|
|
|
|
declare -A bool01=([false]=0 [true]=1)
|
|
|
|
echo "${bool01[$1]}"
|
2018-09-30 11:50:17 +02:00
|
|
|
}
|
|
|
|
|
2024-02-14 13:31:37 +01:00
|
|
|
b01_to_bool() {
|
|
|
|
declare -A b01bool=([0]=false [1]=true)
|
|
|
|
echo "${b01bool[$1]}"
|
2018-09-30 11:50:17 +02:00
|
|
|
}
|
|
|
|
|
2019-01-30 15:56:18 +01:00
|
|
|
#=================================================
|
|
|
|
# EXPERIMENTAL HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
2017-12-05 19:30:08 +01:00
|
|
|
#=================================================
|
2021-02-25 23:05:04 +01:00
|
|
|
# FUTURE OFFICIAL HELPERS
|
2019-01-13 17:49:15 +01:00
|
|
|
#=================================================
|