Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

cygwin path problems?

  • 12-11-2012 11:16PM
    #1
    Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,119 Mod ✭✭✭✭


    Hi I installed cygwin but am having trouble with paths. I have to set a variable to the android sdk path for a script to work. I do that, however it says that it can not find it? I know it is there. Am I setting the variable path wrong? it spits out the path I want as an error when it says it cant find it at that location?! If I type in that path it even works, so am quite confused.

    gPUuQ.png

    Script contents:
    #!/bin/bash
    # You have to run this once in order for ant builds to work
    set -e
    
    if [ -z "${ANDROID_SDK_ROOT+xxx}" ]; then
    	echo "Please define ANDROID_SDK_ROOT to point to the Android SDK"
    	exit 1
    fi
    
    if [ ! -d "$ANDROID_SDK_ROOT" ]; then
        echo "The directory $ANDROID_SDK_ROOT = ${ANDROID_NDK_ROOT} does not exist."
        exit 1
    fi
    
    ANDROID="$ANDROID_SDK_ROOT/tools/android"
    
    command -v "$ANDROID" >/dev/null 2>&1 || { echo >&2 "The $ANDROID tool is not found.  Aborting."; exit 1; }
    
    DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
    ATE_ROOT="$( cd $DIR/.. && pwd )"
    
    echo "Updating android project files"
    
    PROJECT_FILES="$( find "$ATE_ROOT" -name project.properties )"
    
    for PROJECT_FILE in $PROJECT_FILES
    do
        PROJECT_DIR="$( dirname "$PROJECT_FILE" )"
        $ANDROID update project -p "$PROJECT_DIR"
    done
    


Advertisement