Compare commits

...

2 commits

8 changed files with 60 additions and 3 deletions

1
.gitignore vendored
View file

@ -14,6 +14,7 @@
!inventory/
!templates/
!sops/
!proyectos/
# Permitir el seguimiento de archivos específicos
# !archivo1.txt

View file

@ -63,6 +63,7 @@ install() {
local ANSIBLE_PACKAGE="$ANSIBLE_COMMAND"
# Load base bash library
BIN_HOME=$BIN_PATH
source $BIN_PATH/$LIBRARY/base.lib
# Load bootstrap bash library
@ -102,6 +103,13 @@ install() {
# Install dialog from OS Packages
command_installed $DIALOG_PACKAGE
if [ $? -ne 0 ]
then
os_pkgs_install $DIALOG_PACKAGE
fi
# Install zip from OS Packages
command_installed $ZIP_PACKAGE
if [ $? -ne 0 ]
then
os_pkgs_install $ZIP_PACKAGE
fi

View file

@ -0,0 +1 @@
https://keyvalue.immanuel.co

1
bin/config/version Normal file
View file

@ -0,0 +1 @@
0.98.0

View file

@ -18,11 +18,24 @@
# Debería haber recibido una copia de la Licencia Pública Affero General
# junto con este programa. Si no la recibió, consulte <https://www.gnu.org/licenses/>.
DEVS_NAME=config/project.head
DEVSPATH=${DEVSPATH:=devs}
CONFPATH=${CONFPATH:=config}
BIN_BASE=${BIN_BASE:=bin}
if [ -z "${BIN_HOME}" ]; then
BIN_HOME=${HOME}/${DEVSPATH}
fi
BIN_CONF=${BIN_CONF:=${BIN_BASE}/config}
BIN_SOPS=${BIN_SOPS:=${BIN_HOME}/sops}
BIN_MESG=${BIN_MESG:=${BIN_BASE}/msg}
BIN_LIBS=${BIN_LIBS:=${BIN_BASE}/lib}
DEVS_NAME=${CONFPATH}/project.head
GIT_IGNORE=.gitignore
DATENOW="$(date +"%Y-%m-%d %H:%M:%S")"
DATEBAK="$(date +"%Y%m%d%H%M%S")"
FREEKV_URL=$(cat < "${BIN_HOME}/${BIN_BASE}/${CONFPATH}/freekeyval.dat")
FREEKV_SOPS_FILE=freekv-sops.devs.yaml
DOCKER_LOCAL=dockerfile.local
DOCKER_BASE=dockerfile.base
DOCKER_SAAS=dockerfile.saas
@ -30,6 +43,8 @@ DOCKER_BUILD=build
DOCKER_FILE=Dockerfile
DOCKER_ENTRY=entrypoint.sh
VERSION="$(cat < ${BIN_HOME}/${BIN_CONF}/version)"
# Test library
function baselib_test() {
echo "Base Library loaded!"
@ -60,6 +75,7 @@ function display_devstools_header() {
echo "======================================================================"
}
# Display text header for tui dialog
function display_text_header() {
local head_text=$1
local subhead_text=$2
@ -376,3 +392,27 @@ function build_container() {
}
# Get sops token for free remote key/value server
function sops_freekv_token() {
local rc=0
local sops_file="${BIN_SOPS}/${FREEKV_SOPS_FILE}"
if [ ! -f "${sops_file}" ]; then
return 1
fi
token=$(sops -d ${sops_file} | yq .freekv_devs_token)
rc=$?
if [ $rc -ne 0 ]; then
return $rc
fi
if [ -n "${token}" ]; then
return 2
fi
echo "${token}"
return 0
}

View file

@ -19,12 +19,14 @@
# junto con este programa. Si no la recibió, consulte <https://www.gnu.org/licenses/>.
ODOO_DEVS=${ODOODEVS:=odoo}
ODOO_CFGS=${ODOO_CFGS:=configs}
ODOODEVS_PATH="${HOME}/${DEVSPATH:=devs}/${ODOO_DEVS}"
ODOO_REPO_WEB="$(cat ${HOME}/${DEVSPATH:=devs}/bin/config/odoo.repo.2)"
ODOO_REPO_SSH="$(cat ${HOME}/${DEVSPATH:=devs}/bin/config/odoo.repo.1)"
ODOO_REPO_ALT=""
ODOO_REPO_PKG=packs.repos
ODOO_PACK_DEV=packs
ODOO_VERSION="$(cat < ${ODOODEVS_PATH}/${ODOO_CFGS}/odoo.version)"
ODOO_CFG_VERS=("18")

View file

@ -15,11 +15,14 @@ odmsg_000="(ODOO DEVELOPERS TOOLS)"
odmsg_001="- ODOODEVS TOOLS "
odmsg_002="Ambiente Odoo ya ha sido configurado!"
odmsg_003_1="Uso:"
odmsg_003_2="[--help] [--version] "
odmsg_003_2="[--help|-h] [--version|-v] "
odmsg_003_3="<proyecto>"
odmsg_004="Descripción: Este script permite configurar ambiente para desarrolladores odoo"
odmsg_004_1="Descripción: Este script crea una carpeta con estructura de proyecto odoo"
odmsg_005="Opciones:"
odmsg_006=" --help Muestra este mensaje de ayuda."
odmsg_007=" --version Muestra la versión del script."
odmsg_008=" <proyecto> Indica el nombre de la carpeta del proyecto odoo"
odmsg_010="DESCARGAR ODOO ESCOLAR PACK"
odmsg_011="DESCARGAR ODOO BASE PACK"

View file

@ -62,6 +62,7 @@ function install() {
local UPDATE=$5
# Load base bash library
BIN_HOME=$BIN_PATH
source $BIN_PATH/$LIBRARY/base.lib
# Load bootstrap bash library