forked from Akash98Sky/rom_building_system_setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fullsetup.cpp
61 lines (49 loc) · 2.04 KB
/
fullsetup.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include <iostream>
#include <stdio.h>
using namespace std;
void install_pkg()
{
cout<<"\n $ sudo apt-get install bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev openjdk-8-jdk python python3";
cin.ignore();
getchar();
system("sudo apt-get install bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev openjdk-8-jdk python python3");
cout<<endl;
}
void install_sdk()
{
cout << "\n $ mkdir ~/temp && cd ~/temp && wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip";
cin.ignore();
getchar();
system("rm -rf ~/temp/ && mkdir ~/temp && cd ~/temp && wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip");
cout << "\n $ unzip platform-tools-latest-linux.zip -d ~";
cin.ignore();
getchar();
system("unzip ~/temp/platform-tools-latest-linux.zip -d ~");
cout<<endl;
}
void install_repo()
{
cout<<" $ mkdir ~/bin && curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo";
cin.ignore();
getchar();
system( "if [ ! -d \"$HOME/bin\" ]; then \n mkdir ~/bin \n fi");
system("curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo");
cout << endl;
}
int main()
{
char a='n';
cout<<"\n Install packages?(y|n) ";
a=getchar();
if(a=='y'||a=='Y'){ install_pkg(); }
cin.ignore();
cout<<"\n Install SDK?(y|n) ";
a=getchar();
if(a=='y'||a=='Y'){ install_sdk(); }
cin.ignore();
cout<<"\n Install repo?(y|n) ";
a=getchar();
if(a=='y'||a=='Y'){ install_repo(); }
cout<<endl;
return 0;
}