From c025bd0d8fdf061ad6e82707b18721e6672d677b Mon Sep 17 00:00:00 2001 From: "sigonasr2, Sig, Sigo" Date: Tue, 17 May 2022 12:40:41 +0000 Subject: [PATCH] Include descriptive names for commands. --- scripts/build.sh | 1 + scripts/clean.sh | 1 + scripts/commit.sh | 1 + scripts/jar.sh | 1 + sig | 7 ++++++- 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/build.sh b/scripts/build.sh index 5303265..fec7872 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,3 +1,4 @@ +#Builds and runs the project. rm -Rf out/* javac -Xlint:unchecked -cp ${PROJECT_DIR}/.. -d ${OUT_DIR} ${PROJECT_DIR}/*.java printf "\n\n\nRunning Program...\n\n" diff --git a/scripts/clean.sh b/scripts/clean.sh index c0259b7..1a1d44f 100755 --- a/scripts/clean.sh +++ b/scripts/clean.sh @@ -1,2 +1,3 @@ +#Cleans up and removes unused files. find . -type f -name *.class -delete find . -type f -name manifest -delete \ No newline at end of file diff --git a/scripts/commit.sh b/scripts/commit.sh index a9a8092..b93040a 100755 --- a/scripts/commit.sh +++ b/scripts/commit.sh @@ -1,3 +1,4 @@ +#Adds a commit message and pushes project to github repository. git add -u git add * git commit -m "$*" diff --git a/scripts/jar.sh b/scripts/jar.sh index 490db46..7927af0 100755 --- a/scripts/jar.sh +++ b/scripts/jar.sh @@ -1,3 +1,4 @@ +#Builds a runnable jar file using ${MAIN_CLASS} as an entry point and then runs the newly generated jar. rm -Rf bin/* javac -Xlint:unchecked -cp src -d bin ${PROJECT_DIR}/${PROJECT_NAME}.java printf "\n\n\nGenerating Manifest...\n\n" diff --git a/sig b/sig index 83c9d0e..6f3e062 100755 --- a/sig +++ b/sig @@ -19,7 +19,12 @@ if [ -z "$1" ] echo "" echo "" echo " Command List:" - ls -1 ./scripts | sed -e 's/\.sh$//' | sed -e 's/^/ /' + FILES=$(ls -1 ./scripts | sed -e 's/\.sh$//' | sed -e 's/^/ /') + for f in $FILES + do + DESC="$(head -n1 ./scripts/$f.sh)" + printf "\n\t%-15s%-65s" $f "${DESC:1}" + done echo "" exit fi