Skip to content

Commit

Permalink
tuxc: added .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
logenkain committed Apr 22, 2016
1 parent b973d1c commit b9d7f7e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
tuxc
Binary file removed tuxc
Binary file not shown.
14 changes: 6 additions & 8 deletions tuxc.c
Expand Up @@ -9,7 +9,7 @@ int check_file(char *pkg_mgr);
int main(int argc, char *argv[])
{
int i;
char *mgr;
i = 0;

char *pkg_mgr[] = {
"xbps-install", "apt-get",
Expand All @@ -18,15 +18,12 @@ int main(int argc, char *argv[])

for (i=0; i < sizeof(pkg_mgr) / sizeof(pkg_mgr[0]); i++) {

if (check_file(pkg_mgr[i]) == 1){
if (check_file(pkg_mgr[i]) == 0){
break;
}
}
printf("%s\n", pkg_mgr[i]);



return 0;
printf ("%s\n",pkg_mgr[i]);
return 0;
}

//***********Definitions*************
Expand All @@ -42,8 +39,9 @@ int check_file(char *pkg_mgr)

if (access( path, F_OK ) != -1 ) {
printf( "%s exists\n", path);
return 1;
return 0;
}else{
printf( "%s does NOT exist\n", path);
return 1;
}
}

0 comments on commit b9d7f7e

Please sign in to comment.