This commit is contained in:
Ev Bogdanov 2017-02-18 21:50:50 +03:00
parent 30d6f1b0a2
commit cffaea5642
5 changed files with 62 additions and 51 deletions

61
bin/gen Executable file
View file

@ -0,0 +1,61 @@
#!/usr/bin/env bash
want="$1"
## HTML
## -----------------------------------------------------------------------------
if [ $want == 'html' ] || [ $want == '!' ]; then
cat << 'HTML'
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>title</title>
<!-- <link rel="shortcut icon" href="/favicon.ico"> -->
<!-- <link rel="stylesheet" href="index.css"> -->
</head>
<body>
<!-- <script src="index.js"></script> -->
</body>
</html>
HTML
fi
## PERL
## -----------------------------------------------------------------------------
if [ $want == 'perl' ] || [ $want == 'pl' ]; then
cat << 'PERL'
#!/usr/bin/env perl
use strict;
use warnings;
use feature 'say';
use experimental 'signatures';
sub main () {
}
main();
PERL
fi
## GO
## -----------------------------------------------------------------------------
if [ $want == 'go' ]; then
cat << 'GO'
package main
import (
"fmt"
)
func main() {
}
GO
fi

13
bin/go+
View file

@ -1,13 +0,0 @@
#!/usr/bin/env bash
cat << 'GO'
package main
import (
"fmt"
)
func main() {
}
GO

View file

@ -1,16 +0,0 @@
#!/usr/bin/env bash
cat << 'HTML'
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>title</title>
<!-- <link rel="shortcut icon" href="/favicon.ico"> -->
<!-- <link rel="stylesheet" href="style.css"> -->
</head>
<body>
</body>
</html>
HTML

View file

@ -1,19 +0,0 @@
#!/usr/bin/env perl
$template = <<'TMP';
#!/usr/bin/env perl
use strict;
use warnings;
use feature 'say';
use experimental 'signatures';
sub main {
}
main();
TMP
print $template;