Selaa lähdekoodia

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 14 vuotta sitten
vanhempi
commit
8684055bdf
2 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  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