Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: android-sdk install scripts #16

Merged
merged 2 commits into from
Jul 28, 2019

Conversation

vibhorgupta-gh
Copy link
Contributor

#12
Adds scripts for apt, apk and pacman.
yum doesn't seem to have a parent repository for android-sdk. It does have all the dependencies though.

sudo yum install libstdc++.i686
sudo yum install ncurses-libs.i686
sudo yum install zlib.i686

A workaround could be to to update dependencies using yum and then using wget to download the sdk zip, but it would not be true to the package manager. Requesting approval/suggestions. Will keep researching in the meantime.

@agentmilindu please review

yaourt -S android-sdk android-sdk-platform-tools android-sdk-build-tools
sudo touch /tmp/script.sh
cat <<EOF > /tmp/script.sh
export ANDROID_HOME=/opt/android-sdk
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We exporting these here is not permanent, right? I think we should be adding these to a permanent place, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be permanent, I sourced the variable to the bash profile in the very next line

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is how we set the environment variables for Java, maybe we can do the same.

cat >> /etc/environment <<EOL
JAVA_HOME=/usr/lib/jvm/java-8-oracle
JRE_HOME=/usr/lib/jvm/java-8-oracle/jre
EOL

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agentmilindu yes, I read about this. Linux requires direct changes to the environment file. However, that would mean logging in as sudo. We should run the entire script as sudo then.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, We'll put the sudo command where necessary, the user will be prompted to enter the password then and there.

&& wget -q http://dl.google.com/android/repository/tools_r27.0.0-linux.zip -O android-sdk-tools.zip
&& unzip -q android-sdk-tools.zip -d /opt/android-sdk
&& rm -f android-sdk-tools.zip
&& chmod 777 /opt/android-sdk/*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setting to 777 is dangerous, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yes sure. I just changed it to 755.

@vibhorgupta-gh
Copy link
Contributor Author

@agentmilindu made the changes

@agentmilindu agentmilindu merged commit 7e1053d into leopardslab:master Jul 28, 2019
@agentmilindu agentmilindu linked an issue Feb 8, 2020 that may be closed by this pull request
2 tasks
agentmilindu pushed a commit that referenced this pull request Aug 10, 2020
Adding conditions to run generator and minifier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal for android-sdk to have a installer script
2 participants