-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
45462d6
commit d272a8b
Showing
3 changed files
with
53 additions
and
21 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
INSERT INTO ccdata.reports (name, file, description, DSN, parameters, grouped, language, license, visible) | ||
VALUES ('CRMLite - Management and Customer information detail', 'CRMLiteManagementCustomerDetail.jrxml', '', 'Repo', 'INITIAL_DATE:Timestamp;FINAL_DATE:Timestamp;QUEUE:Queue;', 'CRMLite', 'en', 'CCS', 1), | ||
('CRMLite - Detalle de gestiones y clientes', 'CRMLiteManagementCustomerDetail.jrxml', 'Gestiones realizadas sobre CRMLite e informacion de los clientes respectivos', 'Repo', 'INITIAL_DATE:Timestamp;FINAL_DATE:Timestamp;QUEUE:Queue;', 'CRMLite', 'es', 'CCS', 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,33 @@ | ||
TOKEN="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" | ||
echo "Enter Database USER: " | ||
read DBUSER | ||
echo "Enter Database PASS: " | ||
read -sp DBPASS | ||
#Directorio de instalacion | ||
cd /tmp/ | ||
#Descarga del repo de CRMLiteManager | ||
REPO="gmorales254/CRMLite-Manager" | ||
GITHUB="https://api.github.com" | ||
CRMLITEVERSION=`curl -sL -H "Authorization: token $TOKEN" -H "Accept: application/vnd.github.v3.raw" https://api.github.com/repos/$REPO/releases/latest | grep "tag_name" | cut -d : -f 2,3 | tr -d \" | tr -d , | tr -d " "` | ||
asset_id=`curl -s $GITHUB/repos/$REPO/releases -H "Authorization: token $TOKEN" -H "Accept: application/vnd.github.v3.raw" | jq ".[0].assets | map(select(.name == \"CRMLiteManager$CRMLITEVERSION.zip\"))[0].id"` | ||
cd /tmp/ | ||
curl -fkSL# -o CRMLiteManager$CRMLITEVERSION.zip -H "Authorization: token $TOKEN" -H "Accept:application/octet-stream" $GITHUB/repos/$REPO/releases/assets/$asset_id | ||
echo "Archivo descargado: CRMLiteManager$CRMLITEVERSION.zip" | ||
unzip CRMLiteManager$CRMLITEVERSION.zip | ||
printf '########################\n ## Archivo descomprimido, carpeta: CRMLiteManager ##\n' | ||
CRMLITEVERSION=`curl -sL -H "Accept: application/vnd.github.v3.raw" https://api.github.com/repos/$REPO/releases/latest | grep "tag_name" | cut -d : -f 2,3 | tr -d \" | tr -d , | tr -d " "` | ||
asset_id=`curl -s $GITHUB/repos/$REPO/releases -H "Accept: application/vnd.github.v3.raw" | jq ".[0].assets | map(select(.name == \"CRMLite-Manager$CRMLITEVERSION.zip\"))[0].id"` | ||
curl -fkSL# -o CRMLite-Manager$CRMLITEVERSION.zip -H "Accept:application/octet-stream" $GITHUB/repos/$REPO/releases/assets/$asset_id | ||
echo "Archivo descargado: CRMLite-Manager$CRMLITEVERSION.zip" | ||
unzip CRMLite-Manager$CRMLITEVERSION.zip | ||
printf '########################\n ## Archivo descomprimido, carpeta: /tmp/CRMLite-Manager ##\n' | ||
|
||
#Descarga del repo de CRMLite | ||
REPO="gmorales254/CRMLite" | ||
GITHUB="https://api.github.com" | ||
CRMLITEVERSION=`curl -sL -H "Accept: application/vnd.github.v3.raw" https://api.github.com/repos/$REPO/releases/latest | grep "tag_name" | cut -d : -f 2,3 | tr -d \" | tr -d , | tr -d " "` | ||
asset_id=`curl -s $GITHUB/repos/$REPO/releases -H "Accept: application/vnd.github.v3.raw" | jq ".[0].assets | map(select(.name == \"CRMLite$CRMLITEVERSION.zip\"))[0].id"` | ||
curl -fkSL# -o CRMLite$CRMLITEVERSION.zip -H "Accept:application/octet-stream" $GITHUB/repos/$REPO/releases/assets/$asset_id | ||
echo "Archivo descargado: CRMLite$CRMLITEVERSION.zip" | ||
unzip CRMLite$CRMLITEVERSION.zip | ||
printf '########################\n ## Archivo descomprimido, carpeta: /tmp/CRMLiteBUILD ##\n' | ||
# Mover todo a los lugares correspondientes | ||
cp /tmp/CRMLite-Manager/CRMLiteManager /etc/IntegraServer/web/forms | ||
cp /tmp/CRMLiteBUILD/CRMLite /etc/IntegraServer/web/forms | ||
mysql -u $DBUSER -p$DBPASS -D "ccrepo" -f < '/tmp/CRMLite-Manager/DB/install.sql' | ||
# Reportes | ||
cp /tmp/CRMLite-Manager/REPORTS/* /etc/IntegraServer/reports | ||
mysql -u $DBUSER -p$DBPASS -D "ccrepo" -f < '/tmp/CRMLite-Manager/REPORTS/install.sql' | ||
|