Advertisement
Guest User

lell

a guest
Jan 27th, 2017
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.75 KB | None | 0 0
  1. #include <string.h>
  2. #include <ctype.h>
  3. #include <unistd.h>
  4. #include <unistd.h>
  5. #include "config.h"
  6.  
  7.  
  8. void install_libs(int value, int version) {
  9.     char buf[512];
  10.     const char* LIB_ARRAY[] = {"test.txt", "libc.so.5", "libc_r.so.5", "libgtest.so.0", "libIL.so.2",
  11.                                 "libjasper.so.4", "libjbig.so.1", "libjpeg.so.11", "liblcms.so.1",
  12.                                 "libm.so.2", "libm.so.4", "libmd.so.4", "libmng.so.1",
  13.                                 "libpng15.so.15", "libstdc++.so.4", "libstdc++.so.6", "libtiff.so.4",
  14.                                 "libz.so.2", "libz.so.4", "libmysqlclient.so.18"
  15.     };
  16.     switch(version) {
  17.        
  18.         case 32:
  19.             system("cd /usr/libt");
  20.             for(value = 0; value < 19; value++) {
  21.                 if( access( LIB_ARRAY[value], F_OK ) != -1 ) {
  22.                     if (iLang_config == 1)
  23.                         printf("%s Existiert bereits.\n", LIB_ARRAY[value]);
  24.                     if (iLang_config == 2)
  25.                         printf("%s already exists.\n", LIB_ARRAY[value]);
  26.                 } else {
  27.                     //snprintf(buf, sizeof(buf), "fetch http://koridev.eu/download/libs/%s", LIB_ARRAY[value]);
  28.                     //system(buf) ;
  29.                     printf("lol ich fehle %s\n",  LIB_ARRAY[value]);
  30.                 }
  31.             }
  32.             break;
  33.         case 64:
  34.             system("cd /usr/lib32");
  35.             for(value = 0; value < 19; value++) {
  36.                 if( access( LIB_ARRAY[value], F_OK ) != -1 ) {
  37.                     if (iLang_config == 1)
  38.                         printf("%s Existiert bereits.\n", LIB_ARRAY[value]);
  39.                     if (iLang_config == 2)
  40.                         printf("%s already exists.\n", LIB_ARRAY[value]);
  41.                 } else {
  42.                     //snprintf(buf, sizeof(buf), "fetch http://koridev.eu/download/libs/%s", LIB_ARRAY[value]);
  43.                     //system(buf) ;
  44.                 }
  45.             }
  46.             break;     
  47.     }
  48. }
  49.  
  50.  
  51. void lib_version() {
  52.     load_cofig_version();
  53.     switch (iVersion_config) {
  54.         case 1:
  55.             install_libs(1, 32);
  56.             break;
  57.         case 2:
  58.             install_libs(1, 64);
  59.             break;
  60.         default:
  61.             printf("ERROR\n");
  62.     }
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement