From b827361e75e72390e65a33cec67407f369bedd36 Mon Sep 17 00:00:00 2001 From: "sigonasr2, Sig, Sigo" Date: Mon, 13 Dec 2021 15:33:03 +0000 Subject: [PATCH] Setup SigTerm Project --- .gitignore | 1 + .gitpod.yml | 7 +++++++ SigTerm.jar | Bin 0 -> 869 bytes coauthors.sh | 40 ++++++++++++++++++++++++++++++++++++++++ run | 5 +++++ src/sig/SigTerm.java | 7 +++++++ 6 files changed, 60 insertions(+) create mode 100644 .gitignore create mode 100644 .gitpod.yml create mode 100644 SigTerm.jar create mode 100755 coauthors.sh create mode 100755 run create mode 100644 src/sig/SigTerm.java diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c5e82d7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +bin \ No newline at end of file diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..d56c9e9 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,7 @@ +# List the start up tasks. Learn more https://www.gitpod.io/docs/config-start-tasks/ +tasks: + - init: sh ./coauthors.sh +vscode: + extensions: + - redhat.java + - mhutchie.git-graph \ No newline at end of file diff --git a/SigTerm.jar b/SigTerm.jar new file mode 100644 index 0000000000000000000000000000000000000000..2d1020d70490fb6babe1c963a177328ea96079c6 GIT binary patch literal 869 zcmWIWW@Zs#;Nak35UuGAW*(j{<{BKL=j-;__snS@Z(Y5MyxzK6=gyqp9At3C_`%a6JuhD!Pv48Bt5~=g zT)*)2ikir*_9_->((d*SD()^7vH3jdt4Za~8e!wlC3A~~y1UnkbQxd%+GKp$IjFm+ za%aU(u;Wgy%J?1)v^oZeL5|~MU;sK8-DfO7+2YJ}eca9$gsKS6Ob>yBkdx_^{x9I3#d+u)vF8t3Pt$pMw!0*~BVq4*LOEt%Hld3OE{WLidn;*=7 z0w3jQi7c$1akujGy)(1_{`>idsi1EkFS9OpZjR}NjTet@|?eaBnm}}=fS8B#4zl)33 z_?s`@UH6Oen-~ABnTrA&r2=Oa{9AE+s>p_W0k1ROUkERm?RBMjm)1i!)6~!6pfqwp zb>B5LMh1ozKpf!B$Rxsmn#5q~2b9E60X)rs5*)f# ~/.git-coauthors +{ + "coauthors": { + "sig": { + "name": "sigonasr2", + "email": "sigonasr2@gmail.com" + } + } +} +EOF +git mob sig +cat <<-EOF > .git/hooks/prepare-commit-msg +#!/usr/bin/env node +let exec = require('child_process').exec, + fs = require('fs'); +const commitMessage = process.argv[2]; +// expect .git/COMMIT_EDITMSG +if(/COMMIT_EDITMSG/g.test(commitMessage)){ + let contents = ""; + exec("git mob-print", + function (err, stdout) { + if(err) { + process.exit(0); + } + // opens .git/COMMIT_EDITMSG + contents = fs.readFileSync(commitMessage); + if(contents.indexOf(stdout.trim()) !== -1) { + process.exit(0); + } + const commentPos = contents.indexOf('# '); + const gitMessage = contents.slice(0, commentPos); + const gitComments = contents.slice(commentPos) + fs.writeFileSync(commitMessage, gitMessage + stdout + gitComments); + process.exit(0); + }); +} +EOF +chmod +x .git/hooks/prepare-commit-msg +echo "Environment is setup!" \ No newline at end of file diff --git a/run b/run new file mode 100755 index 0000000..6fb0c57 --- /dev/null +++ b/run @@ -0,0 +1,5 @@ +javac --release 8 src/sig/*.java -d bin +cd bin +jar cfe ../SigTerm.jar sig.SigTerm sig +cd .. +java -cp bin sig/SigTerm \ No newline at end of file diff --git a/src/sig/SigTerm.java b/src/sig/SigTerm.java new file mode 100644 index 0000000..d4c5be4 --- /dev/null +++ b/src/sig/SigTerm.java @@ -0,0 +1,7 @@ +package sig; + +public class SigTerm{ + public static void main(String[] args) { + System.out.println("Hello World!"); + } +} \ No newline at end of file