Skip to content

Instantly share code, notes, and snippets.

View olilau's full-sized avatar

Olivier Laurent olilau

  • Logicasoft
  • Charleroi
View GitHub Profile
@olilau
olilau / odoo_upgrade.sh
Created December 20, 2017 07:35
Upload your database on upgrade.odoo.com
#!/bin/bash
set -e
command -v curl >/dev/null 2>&1 || { echo >&2 "I require curl but it's not installed. Aborting."; exit 1; }
command -v jq >/dev/null 2>&1 || { echo >&2 "I require jq but it's not installed. Aborting."; exit 1; }
MAX_CMD_TRIES=100
BASE_WORK_DIR=${HOME}/odoo_upgrade
@olilau
olilau / odoo_download_with_sftp.sh
Created December 20, 2016 14:40
Download an upgraded Odoo database using SFTP.
#!/bin/bash
set -e
command -v curl >/dev/null 2>&1 || { echo >&2 "I require curl but it's not installed. Aborting."; exit 1; }
command -v jq >/dev/null 2>&1 || { echo >&2 "I require jq but it's not installed. Aborting."; exit 1; }
# REQUIRED PARAMETERS:
REQUEST_ID="17654"
KEY="0zWIetJPo7kIWSxVWKUDTQ=="
@olilau
olilau / odoo_upgrade_request.sh
Last active October 1, 2021 09:40
Creates an Odoo upgrade request and uploads the database dump using SFTP.
#!/bin/bash
set -e
VERSION="0.3"
MAX_CMD_TRIES=30
MAX_SFTP_TRIES=100
# check sftp has the "put -a" command:
if man sftp | grep ' put.*local-path.*remote-path' | grep -q afPpr ;