diff options
author | Daniel Stenberg <daniel@haxx.se> | 2006-05-27 22:52:37 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2006-05-27 22:52:37 +0000 |
commit | 33988545f50269cd0c77feab3e5479e7c6330476 (patch) | |
tree | ae006c6f21bd211cd1d3817b9ca9cde5eca313dc /tools/rockboxdev.sh | |
parent | 3465653fd86ce04c824c9d7d7678dc37dac97ddb (diff) |
verify that the download dir exists and is writable, or create it if it is
missing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10001 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/rockboxdev.sh')
-rwxr-xr-x | tools/rockboxdev.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/rockboxdev.sh b/tools/rockboxdev.sh index b5a13cb9df..b6419cf54d 100755 --- a/tools/rockboxdev.sh +++ b/tools/rockboxdev.sh @@ -86,6 +86,23 @@ case $arch in ;; esac +# Verify download directory or create it +if test -d "$dlwhere"; then + if test -w "$dlwhere"; then + echo "Download directory $dlwhere seems to exist and is writable" + else + echo "$dlwhere exists, but doesn't seem to be writable for you" + exit + fi +else + mkdir $dlwhere + if test $? -ne 0; then + echo "$dlwhere is missing and we failed to create it!" + exit + fi + echo "$dlwhere has been created to store downloads in" +fi + if test -d build-rbdev; then echo "you have a build-rbdev dir already, please remove and rerun" exit |