Last active
December 18, 2015 22:26
-
-
Save HopperMCS/78c344126d2f22cc2aec to your computer and use it in GitHub Desktop.
./lgm >> logs.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <sys/types.h> | |
| #include <sys/stat.h> | |
| int | |
| main (int argc, char *argv[]) | |
| { | |
| printf("The Christoffen Corporation Logo Generator\n"); | |
| printf("Written by MGage Morgan\n"); | |
| //Create folder "images" | |
| printf("Adding an images folder...\n"); | |
| mkdir("/output", 755); | |
| mkdir("/images", 755); | |
| //Enter Source | |
| printf("Entering /src...\n"); | |
| chdir("cd /src"); | |
| //Compile, place executable in the output folder (see above) | |
| printf("Compiling first triangle outline executable file...\n"); | |
| system("cc -o ../output/first-triangle `pkg-config --cflags cairo` first-triangle.c `pkg-config --libs cairo`"); | |
| //Compile, place executable in the output folder (see above) | |
| printf("Compiling the second triangle outline executable file...\n"); | |
| system("cc -o ../output/second-triangle `pkg-config --cflags cairo` second-triangle.c `pkg-config --libs cairo`"); | |
| //Compile, place executable in the output folder (see above) | |
| printf("Compiling the third triangle outline executable file...\n"); | |
| system("cc -o ../output/third-triangle `pkg-config --cflags cairo` third-triangle.c `pkg-config --libs cairo`"); | |
| //Compile, place executable in the output folder (see above) | |
| printf("Compiling the fourth triangle outline executable file...\n"); | |
| system("cc -o ../output/fourth-triangle `pkg-config --cflags cairo` fourth-triangle.c `pkg-config --libs cairo`"); | |
| //Compile, place executable in the output folder (see above) | |
| printf("Compiling the fifth triangle outline executable file...\n"); | |
| system("cc -o ../output/fifth-triangle `pkg-config --cflags cairo` fifth-triangle.c `pkg-config --libs cairo`"); | |
| //Compile, place executable in the output folder (see above) | |
| printf("Compiling the sixth triangle outline executable file...\n"); | |
| system("cc -o ../output/sixth-triangle-color `pkg-config --cflags cairo` sixth-triangle-color.c `pkg-config --libs cairo`"); | |
| //Compile, place executable in the output folder (see above) | |
| printf("Compiling the seventh triangle outline executable file...\n"); | |
| system("cc -o ../output/seventh-triangle `pkg-config --cflags cairo` seventh-triangle.c `pkg-config --libs cairo`"); | |
| //Compile all-triangles.c, place executable binary in /output | |
| printf("Compiling the executable file containing all outlines in one...\n"); | |
| system("cc -o ../output/all-triangles `pkg-config --cflags cairo` all-triangles.c `pkg-config --libs cairo`"); | |
| //The command to create the first triangle of the blue "C" | |
| printf("Compiling the first colored triangle executable file...\n"); | |
| system("cc -o ../output/first-triangle-color `pkg-config --cflags cairo` first-triangle-color.c `pkg-config --libs cairo`"); | |
| //The command to create the second triangle of the blue "C" | |
| printf("Compiling the second colored triangle executable file...\n"); | |
| system("cc -o ../output/second-triangle-color `pkg-config --cflags cairo` second-triangle-color.c `pkg-config --libs cairo`"); | |
| //The command to create the third triangle of the blue "C" | |
| printf("Compiling the third colored triangle executable file...\n"); | |
| system("cc -o ../output/third-triangle-color `pkg-config --cflags cairo` third-triangle-color.c `pkg-config --libs cairo`"); | |
| //The command to create the fourth triangle of the blue "C" | |
| printf("Compiling the fourth colored triangle executable file...\n"); | |
| system("cc -o ../output/fourth-triangle-color `pkg-config --cflags cairo` fourth-triangle-color.c `pkg-config --libs cairo`"); | |
| //The command to create the fifth triangle of the blue "C" | |
| printf("Compiling the fifth colored triangle executable file...\n"); | |
| system("cc -o ../output/fifth-triangle-color `pkg-config --cflags cairo` fifth-triangle-color.c `pkg-config --libs cairo`"); | |
| //The command to create the sixth triangle of the blue "C" | |
| printf("Compiling the sixth colored triangle executable file...\n"); | |
| system("cc -o ../output/sixth-triangle-color `pkg-config --cflags cairo` sixth-triangle-color.c `pkg-config --libs cairo`"); | |
| //The command to create the seventh triangle of the blue "C" | |
| printf("Compiling the seventh colored triangle executable file...\n"); | |
| system("cc -o ../output/seventh-triangle-color `pkg-config --cflags cairo` seventh-triangle-color.c `pkg-config --libs cairo`"); | |
| //The command to create the text of the Christoffen logo. | |
| printf("Compiling the logo's text in an executable file format...\n"); | |
| system("cc -o ../output/logo-text `pkg-config --cflags cairo` text.c `pkg-config --libs cairo`"); | |
| //The command to create the entire blue "C" | |
| printf("Compiling the entire logo in an executable file...\n"); | |
| system("cc -o ../output/all-triangles-color `pkg-config --cflags cairo` all-triangles-color.c `pkg-config --libs cairo`"); | |
| //The command to create the entire blue "c" with the text under it. | |
| printf("Compiling the entire logo and text in an executable file...\n"); | |
| system("cc -o ../output/all-with-text `pkg-config --cflags cairo` all-with-text.c `pkg-config --libs cairo`"); | |
| //Switch to outpudds | |
| printf("Switching to the outpudds folder where executables are stored...\n"); | |
| system("cd .."); | |
| system("cd /output"); | |
| //Run executable | |
| printf("Generating the first outlined triangle...\n"); | |
| system("./first-triangle"); | |
| //Run executable | |
| printf("Generating the second outlined triangle...\n"); | |
| system("./second-triangle"); | |
| //Run executable | |
| printf("Generating the third outlined triangle...\n"); | |
| system("./third-triangle"); | |
| //Run executable | |
| printf("Generating the fourth outlined triangle...\n"); | |
| system("./fourth-triangle"); | |
| //Run executable | |
| printf("Generating the fifth outlined triangle...\n"); | |
| system("./fifth-triangle"); | |
| //Run executable | |
| printf("Generating the sixth outlined triangle...\n"); | |
| system("./sixth-triangle"); | |
| //Run executable | |
| printf("Generating the seventh outlined triangle...\n"); | |
| system("./seventh-triangle"); | |
| //Run executable | |
| printf("Generating all outlined triangles...\n"); | |
| system("./all-triangles"); | |
| //Create the first triangle | |
| printf("Generating the first colored triangle...\n"); | |
| system("./first-triangle-color"); | |
| //Create the second triangle | |
| printf("Generating the second colored triangle...\n"); | |
| system("./second-triangle-color"); | |
| //Create the third triangle | |
| printf("Generating the third colored triangle...\n"); | |
| system("./third-triangle-color"); | |
| //Create the fourth triangle | |
| printf("Generating the fourth colored triangle...\n"); | |
| system("./fourth-triangle-color"); | |
| //Create the fifth triangle | |
| printf("Generating the fifth colored triangle...\n"); | |
| system("./fifth-triangle-color"); | |
| //Create the sixth triangle | |
| printf("Generating the sixth colored triangle...\n"); | |
| system("./sixth-triangle-color"); | |
| //Create the seventh triangle | |
| printf("Generating the seventh colored triangle...\n"); | |
| system("./seventh-triangle-color"); | |
| //Create the text to be used in the logo | |
| printf("Generating the logo text...\n"); | |
| system("./logo-text"); | |
| //Make the colored logo | |
| printf("Generating all of the colored triangles...\n"); | |
| system("./all-triangles-color"); | |
| //Create the colored logo with text | |
| printf("Generating all of the colored triangles with text...\n"); | |
| system("./all-with-text"); | |
| //Return to the directory we were originally in | |
| printf("Exiting the outpudds folder...\n"); | |
| system("cd .."); | |
| } |
gcc -o lgm main.c
main.c: In function ‘main’:
main.c:15:1: error: too few arguments to function ‘mkdir’
mkdir("/output");
^
In file included from main.c:4:0:
/usr/include/i386-linux-gnu/sys/stat.h:321:12: note: declared here
extern int mkdir (const char *__path, __mode_t __mode)
^
main.c:16:1: error: too few arguments to function ‘mkdir’
mkdir("/images");
^
In file included from main.c:4:0:
/usr/include/i386-linux-gnu/sys/stat.h:321:12: note: declared here
extern int mkdir (const char *__path, __mode_t __mode)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The Christoffen Corporation Logo Generator
Written by MGage Morgan
Adding an images folder...
Entering /src...
Compiling first triangle outline executable file...
Compiling the second triangle outline executable file...
Compiling the third triangle outline executable file...
Compiling the fourth triangle outline executable file...
Compiling the fifth triangle outline executable file...
Compiling the sixth triangle outline executable file...
Compiling the seventh triangle outline executable file...
Compiling the executable file containing all outlines in one...
Compiling the first colored triangle executable file...
Compiling the second colored triangle executable file...
Compiling the third colored triangle executable file...
Compiling the fourth colored triangle executable file...
Compiling the fifth colored triangle executable file...
Compiling the sixth colored triangle executable file...
Compiling the seventh colored triangle executable file...
Compiling the logo's text in an executable file format...
Compiling the entire logo in an executable file...
Compiling the entire logo and text in an executable file...
Switching to the outpudds folder where executables are stored...
Generating the first outlined triangle...
Generating the second outlined triangle...
Generating the third outlined triangle...
Generating the fourth outlined triangle...
Generating the fifth outlined triangle...
Generating the sixth outlined triangle...
Generating the seventh outlined triangle...
Generating all outlined triangles...
Generating the first colored triangle...
Generating the second colored triangle...
Generating the third colored triangle...
Generating the fourth colored triangle...
Generating the fifth colored triangle...
Generating the sixth colored triangle...
Generating the seventh colored triangle...
Generating the logo text...
Generating all of the colored triangles...
Generating all of the colored triangles with text...
Exiting the outpudds folder...