소스 검색

downloadTestAssets: Simplify script and remove explicit check

If the name of the repo is not vlckit or project the old script would've failed
Instead of checking for the .git file we're now checking if the Assets directory exists
Carola Nitz 7 년 전
부모
커밋
b841ad2848
1개의 변경된 파일2개의 추가작업 그리고 9개의 파일을 삭제
  1. 2 9
      Tests/downloadTestAssets.sh

+ 2 - 9
Tests/downloadTestAssets.sh

@@ -13,16 +13,9 @@ error()
 
 ASSET_DIR="Assets"
 
-PWD=$(pwd | xargs basename);
+cd "$(dirname "$0")"
 
-if [ ${PWD} = "vlckit" ] || [ ${PWD} = "project" ] ; then
-  cd Tests
-elif [ ${PWD} != "Tests" ]; then
-  error "Running program from unknown directory. Please move to project's root directory; vlckit"
-  exit 1
-fi
-
-if [ -d ${ASSET_DIR}/.git ]; then
+if [ -e ${ASSET_DIR} ]; then
   cd ${ASSET_DIR}
   git reset --hard
   git pull origin master