index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-rwxr-xr-x | bin/mysql-functions | 18 |
diff --git a/bin/mysql-functions b/bin/mysql-functions index d9962a9..5148773 100755 --- a/bin/mysql-functions +++ b/bin/mysql-functions @@ -137,3 +137,21 @@ mysql_show_binary_package() { ' )" --html } + +# mysql_add_install_target $install_target + +# shellcheck disable=SC2016,2086 +mysql_add_install_target() { + local install_target + install_target=$( + printf "%s" "$1" | \ + base64 -w0 + ) + + ${mysql_command} "$( + printf 'INSERT IGNORE INTO `install_targets` (`name`)' + printf ' VALUES (from_base64("%s"))' \ + "${install_target}" + printf '\n' + )" +} |