浏览代码

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 年之前
父节点
当前提交
8684055bdf
共有 2 个文件被更改,包括 5 次插入1 次删除
  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