diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2016-03-12 00:52:58 +0100 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2016-03-12 00:52:58 +0100 |
commit | ea522742c58e4819e4c4b2db29f77e0bf1b5b5eb (patch) | |
tree | 67056d8e1266471c9a2cba2fc60a23278be26aff | |
parent | f7858bced18056208052ddb95ffa0285067a71e4 (diff) | |
download | chd_gestion-ea522742c58e4819e4c4b2db29f77e0bf1b5b5eb.zip chd_gestion-ea522742c58e4819e4c4b2db29f77e0bf1b5b5eb.tar.gz chd_gestion-ea522742c58e4819e4c4b2db29f77e0bf1b5b5eb.tar.bz2 |
Bugfix : dont use fixed path for source path
-rwxr-xr-x | generator/make.sh | 9 | ||||
-rwxr-xr-x | generator/quick.sh | 5 |
2 files changed, 10 insertions, 4 deletions
diff --git a/generator/make.sh b/generator/make.sh index fed4a03..ebd720e 100755 --- a/generator/make.sh +++ b/generator/make.sh @@ -17,6 +17,9 @@ # You should have received a copy of the GNU General Public License # along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>. # +this=$(readlink -f $0) +src_dir=$(dirname $this) + cd /var/www # Sauver la précédente fournée @@ -33,7 +36,7 @@ cd chd_gestion || exit ln -s ../composer.phar # Personnaliser les dépendances (forcer CakePHP 3.1.10) -cp -a /root/chd_gestion_generator/composer.json . +cp -a "$src_dir/composer.json" . # Deployer un squellette d'appli (avec les dépendances) yes | php composer.phar create-project # Cakephp/app nous sert de base, mais a été installé comme dépendance à cause de l'utilisation du composer.json @@ -66,7 +69,7 @@ Time::setToStringFormat([IntlDateFormatter::SHORT, -1]); EOT # Ajout des personnalisations qui s'expriment pas facilement dans un script -rsync -ai /root/chd_gestion_generator/before-bake/ ./ +rsync -ai "$src_dir/before-bake/" ./ # Génération de l'ensemble du CRUD ( http://book.cakephp.org/3.0/en/bake/usage.html ) for table in $(bin/cake bake all | sed -ne 's/^- \(.*\)$/\1/p' | grep -vE '^v_') @@ -75,4 +78,4 @@ do done # Ecarsement de certains modèles générés -rsync -aib --backup-dir=../src.orig /root/chd_gestion_generator/after-bake/src/ ./src/ +rsync -aib --backup-dir=../src.orig "$src_dir/after-bake/src/" ./src/ diff --git a/generator/quick.sh b/generator/quick.sh index e6240c9..1c7e7e8 100755 --- a/generator/quick.sh +++ b/generator/quick.sh @@ -17,8 +17,11 @@ # You should have received a copy of the GNU General Public License # along with CHD Gestion. If not, see <http://www.gnu.org/licenses/>. # +this=$(readlink -f $0) +src_dir=$(dirname $this) + cd /var/www/chd_gestion # Ecarsement de certains modèles générés -rsync -aib --backup-dir=../src.orig /root/chd_gestion_generator/after-bake/src/ ./src/ +rsync -aib --backup-dir=../src.orig "$src_dir/after-bake/src/" ./src/ |