Skip to content
This repository was archived by the owner on Oct 4, 2020. It is now read-only.

Commit 668c53d

Browse files
committed
Update auto
1 parent 6be5ad2 commit 668c53d

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

LanGong

0 Bytes
Binary file not shown.

help.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,9 @@ Mean: Uninstall a Package.
3838
Use: './LanGong uninstall <PackageName>'
3939
Remarks: You have to use the 'root'.
4040
41+
6. 'search'
42+
Mean: Search LanGong's Package from GitHub.
43+
Use: './LanGong search'
44+
4145
Remarks: 'Help' is update at 2020-05-01.
4246
"

main

22.2 KB
Binary file not shown.

main.cpp

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ int main(int argc, char* argv[])
4343
char nameerr[]="Type";
4444
throw nameerr;
4545
}
46+
system("echo 'Updating...' && git pull && echo");
4647
strcpy(type,argv[1]);
4748
//strcpy(type,trim(temp));
4849
strcpy(temp,"install");
@@ -59,7 +60,7 @@ int main(int argc, char* argv[])
5960
strcpy(clas,argv[2]);
6061
//strcpy(clas,trim(temp));
6162
if(strcmp(clas,"github")==0){//GitHub
62-
printf(" Install form GitHub : \n\n\n");
63+
printf(" Install form GitHub : \n");
6364
strcpy(temp,argv[3]);
6465
strcpy(name,trim(temp));
6566
char dobash[105];
@@ -73,7 +74,7 @@ int main(int argc, char* argv[])
7374
return 0;
7475
}
7576
else if(strcmp(clas,"langonggit")==0){//langonggit
76-
printf(" Install from LanGit : \n\n\n");
77+
printf(" Install from LanGit : \n");
7778
strcpy(name,argv[3]);
7879
char dobash[10005];
7980
strcpy(dobash,"cd ~/LanGongFile/ && mkdir ");
@@ -89,16 +90,15 @@ int main(int argc, char* argv[])
8990
return 0;
9091
}
9192
else if(strcmp(clas,"langong")==0){
92-
printf(" Install from LanGong Package : \n\n\n");
93-
strcpy(name,argv[3]);
94-
char dobash[10005];
95-
strcpy(dobash,"cd ~/LanGongFile/ && mkdir ");
96-
strcat(dobash,name);
97-
strcat(dobash," && cd ");
93+
printf(" Install form LanGong-GitHub : \n");
94+
strcpy(temp,argv[3]);
95+
strcpy(name,trim(temp));
96+
char dobash[105];
97+
strcpy(dobash,"cd ~/LanGongFile/ && git clone https://github.com/langong-dev/");
9898
strcat(dobash,name);
99-
strcat(dobash," && wget https://langong-dev.github.io/Package/pac/");
99+
strcat(dobash,".git && cd ");
100100
strcat(dobash,name);
101-
strcat(dobash,".zip -O download.zip -o download.log && unzip download.zip && bash before.sh");
101+
strcat(dobash," && bash before.sh");
102102
system(dobash);
103103
printf("\n\n Install successfully! \n");
104104
return 0;
@@ -138,6 +138,10 @@ int main(int argc, char* argv[])
138138
system("git pull");
139139
return 0;
140140
}
141+
else if(strcmp(type,"search")==0){
142+
system("echo 'We found these Packages:' && curl https://langong-dev.github.io/Package/repos");
143+
return 0;
144+
}
141145
else if(strcmp(type,"uninstall")==0){
142146
if(argv[2]==NULL){
143147
char nameerr[]="Name";

0 commit comments

Comments
 (0)