Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests: Add script to download assets
- Loading branch information
1 parent
458b355
commit 1be28e1
Showing
3 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/sh | ||
# Copyright (C) Mike JS. Choi, 2018 | ||
# Copyright (C) 2018 VLC authors and VideoLAN | ||
|
||
set -e | ||
|
||
error() | ||
{ | ||
local red="\033[31m" | ||
local normal="\033[0m" | ||
echo "${red}error:${normal} $1" | ||
} | ||
|
||
ASSET_DIR="Assets" | ||
|
||
PWD=$(pwd | xargs basename); | ||
|
||
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 | ||
cd ${ASSET_DIR} | ||
git reset --hard | ||
git pull origin master | ||
else | ||
git clone https://code.videolan.org/videolan/TestAssets.git ${ASSET_DIR} | ||
|
||
if [ $? -ne 0 ]; then | ||
error "Please remove all files in vlckit/Tests/${ASSET_DIR} and try again" | ||
exit 1 | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters