Explorar el Código

Fix calling *_vendors.sh scripts when not in the root of the project

If you were in, say, SF_DIR/src/ and call ../install_vendors.sh, it would
create the vendors directory inside SF_DIR/src instead of SF_DIR/.
Also, use the internal $PWD variable instead of calling an external program.
Laurent Bachelier hace 14 años
padre
commit
8684055bdf
Se han modificado 2 ficheros con 5 adiciones y 1 borrados
  1. 2 0
      install_vendors.sh
  2. 3 1
      update_vendors.sh

+ 2 - 0
install_vendors.sh

@@ -1,5 +1,7 @@
 #!/bin/sh
 
+cd $(dirname $0)
+
 # initialization
 if [ -d "vendor" ]; then
   rm -rf vendor/*

+ 3 - 1
update_vendors.sh

@@ -1,6 +1,8 @@
 #!/bin/sh
 
-CURRENT=`pwd`/vendor
+cd $(dirname $0)
+
+CURRENT=${PWD}/vendor
 
 # Doctrine ORM
 cd $CURRENT/doctrine && git pull