1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lionwiki-t2t_ynh.git synced 2024-09-03 19:36:27 +02:00
lionwiki-t2t_ynh/scripts/_common.sh

28 lines
753 B
Bash
Raw Normal View History

2020-03-01 11:28:28 +01:00
#!/bin/bash
#=================================================
# COMMON VARIABLES
#=================================================
#=================================================
# PERSONAL HELPERS
#=================================================
_validate_color() {
# Remove eventual '#' prefix from color
color=${color#"#"}
# Check if the format is valid, put #555555 instead
if [[ ! "$color" =~ ^[A-Fa-f0-9]{6}$ ]]; then
color=555555
fi
echo "$color"
}
2020-03-01 11:28:28 +01:00
#=================================================
# EXPERIMENTAL HELPERS
#=================================================
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================