From 33988545f50269cd0c77feab3e5479e7c6330476 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 27 May 2006 22:52:37 +0000 Subject: 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 --- tools/rockboxdev.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tools/rockboxdev.sh b/tools/rockboxdev.sh index b5a13cb..b6419cf 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 -- cgit v1.1