Major overhaul getting started
This commit is contained in:
		
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| ./helloworld | ||||
| ./helloworld.class | ||||
| ./helloworld.exe | ||||
							
								
								
									
										64
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										64
									
								
								Makefile
									
									
									
									
									
								
							| @@ -1,45 +1,13 @@ | ||||
| INSTALLER != curl -s https://aninix.net/foundation/installer-test.bash | /bin/bash | ||||
|  | ||||
| all: c csharp java bash php hack perl | ||||
| 	echo Done; | ||||
|  | ||||
| compile: | ||||
| 	[ -f helloworld.c ] | ||||
| compile: c cs java bash php perl python | ||||
|  | ||||
| install: compile | ||||
| 	@echo This project cannot be installed. | ||||
|  | ||||
| test: all | ||||
| test: compile | ||||
| 	python3 -m pytest | ||||
|  | ||||
| clean: | ||||
| 	@echo Nothing to do.  | ||||
|  | ||||
| c: helloworld.c /usr/bin/gcc | ||||
| 	gcc -o helloworld helloworld.c | ||||
| 	./helloworld | ||||
| 	rm ./helloworld | ||||
|  | ||||
| java: helloworld.java /usr/bin/java /usr/bin/javac | ||||
| 	javac helloworld.java | ||||
| 	java helloworld | ||||
| 	rm helloworld.class | ||||
|  | ||||
| bash: helloworld.bash /usr/bin/bash | ||||
| 	bash helloworld.bash | ||||
|  | ||||
| php: helloworld.php /usr/bin/php | ||||
| 	php helloworld.php | ||||
|  | ||||
| hack: helloworld.php /usr/bin/hhvm | ||||
| 	hhvm --php helloworld.php | ||||
|  | ||||
| perl: helloworld.pl /usr/bin/perl | ||||
| 	perl ./helloworld.pl | ||||
|  | ||||
| csharp: helloworld.csharp /usr/bin/mono /usr/bin/mcs | ||||
| 	mcs helloworld.csharp | ||||
| 	mono helloworld.exe | ||||
| 	rm helloworld.exe | ||||
| 	cat .gitignore | xargs -n 1 rm -Rf  | ||||
|  | ||||
| diff:  | ||||
| 	@echo Nothing to do. | ||||
| @@ -49,3 +17,27 @@ reverse: | ||||
|  | ||||
| checkperm: | ||||
| 	@echo Nothing to do. | ||||
|  | ||||
| c: helloworld.c /usr/bin/gcc | ||||
| 	gcc -o helloworld helloworld.c | ||||
|  | ||||
| java: helloworld.java /usr/bin/java /usr/bin/javac | ||||
| 	javac helloworld.java | ||||
|  | ||||
| bash: helloworld.bash /usr/bin/bash | ||||
| 	#bash helloworld.bash | ||||
|  | ||||
| php: helloworld.php /usr/bin/php | ||||
| 	#php helloworld.php | ||||
|  | ||||
| #hack: helloworld.php /usr/bin/hhvm | ||||
| 	#hhvm --php helloworld.php | ||||
|  | ||||
| perl: helloworld.pl /usr/bin/perl | ||||
| 	#perl ./helloworld.pl | ||||
|  | ||||
| python: helloworld.py /usr/bin/python3 | ||||
| 	#python3 ./helloworld.py | ||||
|  | ||||
| cs: helloworld.cs /usr/bin/mono /usr/bin/mcs | ||||
| 	mcs helloworld.cs | ||||
|   | ||||
							
								
								
									
										46
									
								
								PKGBUILD
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								PKGBUILD
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,46 @@ | ||||
| # Maintainer: Shikoba Kage <darkfeather@aninix.net> | ||||
| pkgname=cryptoworkbench | ||||
| pkgver=0.1.ac4a8cb406377081eb1c1de2a3abe482508d6f57 | ||||
| pkgver() { | ||||
|     printf "0.1.""$(git rev-parse HEAD)" | ||||
| } | ||||
| pkgrel=1 | ||||
| epoch= | ||||
| pkgdesc="AniNIX::CryptoWorkbench \\\\ Simple Cryptography Utility" | ||||
| arch=("x86_64") | ||||
| url="https://aninix.net/foundation/CryptoWorkbench" | ||||
| license=('custom') | ||||
| groups=() | ||||
| depends=('mono>=5.0.0' 'curl' 'grep' 'bash>=4.4' 'git>=2.13') | ||||
| makedepends=('make>=4.2') | ||||
| checkdepends=() | ||||
| optdepends=() | ||||
| provides=('cryptoworkbench') | ||||
| conflicts=() | ||||
| replaces=() | ||||
| backup=() | ||||
| options=() | ||||
| install= | ||||
| changelog= | ||||
| source=() | ||||
| noextract=() | ||||
| md5sums=() | ||||
| validpgpkeys=() | ||||
|  | ||||
| prepare() { | ||||
|     git pull | ||||
| } | ||||
|  | ||||
| build() { | ||||
|     make -C .. | ||||
| } | ||||
|  | ||||
| check() { | ||||
| 	printf 'quit\n\n' | make -C "${srcdir}/.." test | ||||
| } | ||||
|  | ||||
| package() { | ||||
|     export pkgdir="${pkgdir}" | ||||
| 	make -C .. install | ||||
|     install -D -m644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" | ||||
| } | ||||
							
								
								
									
										1
									
								
								README
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								README
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| This project is enabled for AniNIX::Foundation. You can check it out remotely with the git package. It is intended to display example source for all of our projects. | ||||
| @@ -1,2 +0,0 @@ | ||||
| This project is enabled for AniNIX::Bazaar. You can check it out remotely with the bzr package. | ||||
| Project URL is bzr://bazaar.aninix.net/HelloWorld | ||||
| @@ -1,2 +1,22 @@ | ||||
| #!/usr/bin/bash | ||||
| printf "Hello world!\n" | ||||
|  | ||||
| # File: helloworld.bash | ||||
| #  | ||||
| # Description: This file exemplifies printing 'Hello world!' in bash.  | ||||
| #  | ||||
| # Package: AniNIX::Foundation/HelloWorld | ||||
| # Copyright: WTFPL | ||||
| #  | ||||
| # Author: DarkFeather <darkfeather@aninix.net> | ||||
|  | ||||
| ### <summary> | ||||
| ### Prints 'Hello world!'  | ||||
| ### </summary> | ||||
| function helloWorld() {  | ||||
|     printf "Hello world!\n" | ||||
| } | ||||
|  | ||||
| ## MAIN | ||||
| if [ `echo "$0" | egrep '(^|/)helloworld.bash'` ]; then | ||||
|     helloWorld | ||||
| fi | ||||
|   | ||||
							
								
								
									
										23
									
								
								helloworld.c
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								helloworld.c
									
									
									
									
									
								
							| @@ -1,6 +1,27 @@ | ||||
| #include <stdio.h> | ||||
|  | ||||
| /* | ||||
|  * File: helloworld.c | ||||
|  *  | ||||
|  * Description: This file exemplifies printing 'Hello world!' in C.  | ||||
|  *  | ||||
|  * Package: AniNIX::Foundation/HelloWorld | ||||
|  * Copyright: WTFPL | ||||
|  *  | ||||
|  * Author: DarkFeather <darkfeather@aninix.net> | ||||
|  */ | ||||
|  | ||||
| static char * message = "Hello world!"; | ||||
|  | ||||
| /// <summary> | ||||
| ///  Prints 'Hello world!'  | ||||
| /// </summary> | ||||
| void HelloWorld() { | ||||
|     printf("%s\n",message); | ||||
| } | ||||
|  | ||||
| // MAIN | ||||
| int main(int argc, char* argv[]) { | ||||
|   printf("Hello world!\n"); | ||||
|     HelloWorld(); | ||||
|     return 0; | ||||
| } | ||||
|   | ||||
| @@ -1,9 +1,31 @@ | ||||
| using System; | ||||
|  | ||||
| /* | ||||
|  * File: helloworld.cs | ||||
|  *  | ||||
|  * Description: This file exemplifies printing 'Hello world!' in C#.  | ||||
|  *  | ||||
|  * Package: AniNIX::Foundation/HelloWorld | ||||
|  * Copyright: WTFPL | ||||
|  *  | ||||
|  * Author: DarkFeather <darkfeather@aninix.net> | ||||
|  */ | ||||
|  | ||||
| namespace AniNIX { | ||||
|     class HelloWorld { | ||||
| 	public static void Main(string[] args) { | ||||
|  | ||||
|     public sealed class HelloWorld { | ||||
|  | ||||
|         /// <summary> | ||||
|         /// Print 'Hello world!' | ||||
|         /// </summary> | ||||
|         public static void PrintHelloWorld() { | ||||
|             Console.WriteLine("Hello world!"); | ||||
|         } | ||||
|  | ||||
|         // Main | ||||
|         public static void Main(string[] args) { | ||||
|             HelloWorld.PrintHelloWorld(); | ||||
|             return; | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -1,9 +0,0 @@ | ||||
| using System; | ||||
|  | ||||
| namespace AniNIX { | ||||
|     class HelloWorld { | ||||
| 	public static void Main(string[] args) { | ||||
| 	    Console.WriteLine("Hello world!"); | ||||
| 	} | ||||
|     } | ||||
| } | ||||
							
								
								
									
										3
									
								
								helloworld.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								helloworld.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| #!/usr/bin/python3 | ||||
|  | ||||
| print('Hello World!\n'); | ||||
							
								
								
									
										
											BIN
										
									
								
								tests/__pycache__/test_unit.cpython-37-PYTEST.pyc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								tests/__pycache__/test_unit.cpython-37-PYTEST.pyc
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										15
									
								
								tests/test_unit.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								tests/test_unit.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| import os | ||||
| import re | ||||
| import shutil | ||||
|  | ||||
| def checkOutput(output): | ||||
|     for line in output.split('\n'): | ||||
|         if line == 'Hello world!': return True | ||||
|     return False | ||||
|  | ||||
| def test_c(): | ||||
|     print(os.getcwd()) | ||||
|     fh = os.popen("./helloworld", mode='r', buffering=-1) | ||||
|     output = fh.read() | ||||
|     retcode = fh.close() | ||||
|     assert retcode == None and checkOutput(output) | ||||
		Reference in New Issue
	
	Block a user
	 DarkFeather
					DarkFeather