←︎ stagit :: aa76b14


1
commit aa76b142f712e355b422d3ea157b60437dba4bb3
2
Author: acidvegas <acid.vegas@acid.vegas>
3
Date:   Sun May 3 05:12:04 2020 -0400
4
5
    Removed local variables that arent posix compliant
6
---
7
 stagit | 32 ++++++++++++++++----------------
8
 1 file changed, 16 insertions(+), 16 deletions(-)
9
10
diff --git a/stagit b/stagit
11
index f882935..a6d1690 100755
12
--- a/stagit
13
+++ b/stagit
14
@@ -67,42 +67,42 @@ generate_index() {
15
 }
16
 
17
 generate_repository_index() {
18
-	local REPO_NAME=$1
19
-	local REPO_URL=$2
20
+	_REPO_NAME=$1
21
+	_REPO_URL=$2
22
 	shift 2
23
-	local REPO_DESC="${@}"
24
-	mkdir -p $WWW_DIR/$REPO_NAME/commit
25
+	_REPO_DESC="${@}"
26
+	mkdir -p $WWW_DIR/$_REPO_NAME/commit
27
 	{
28
 		echo "<!doctype html>"
29
 		echo "<link rel=\"stylesheet\" href=\"../style.css\">"
30
-		echo "<title>$REPO_NAME</title>"
31
-		echo "<h1><a href=\"../index.html\" title=\"Home\">&#8962;&#xFE0E;</a> $REPO_NAME</h1>"
32
+		echo "<title>$_REPO_NAME</title>"
33
+		echo "<h1><a href=\"../index.html\" title=\"Home\">&#8962;&#xFE0E;</a> $_REPO_NAME</h1>"
34
 		echo "<div style=\"padding-left:30px\">"
35
-		echo "<h4>$REPO_DESC</h4>"
36
-		echo "<h5>git clone <a href=\"$REPO_URL\" title=\"$REPO_NAME clone URL\">$REPO_URL</a></h5>"
37
+		echo "<h4>$_REPO_DESC</h4>"
38
+		echo "<h5>git clone <a href=\"$_REPO_URL\" title=\"$_REPO_NAME clone URL\">$_REPO_URL</a></h5>"
39
 		echo "</div>"
40
 		echo "<hr>"
41
 		echo "<table id=\"main\" cellpadding=\"0\" cellspacing=\"0\">"
42
 		echo "<tr id=\"navigation\"><th></th><th>Hash</th><th>Commit message</th><th>Author</th><th>Date</th><th align=\"right\">Files</th><th align=\"right\">+</th><th align=\"right\">-</th></tr>"
43
-	} > $WWW_DIR/$REPO_NAME/index.html
44
+	} > $WWW_DIR/$_REPO_NAME/index.html
45
 }
46
 
47
 generate_commit_index() {
48
-	local REPO_NAME=$1
49
-	local COMMIT_HASH=$2
50
+	_REPO_NAME=$1
51
+	_COMMIT_HASH=$2
52
 	{
53
 		echo "<!doctype html>"
54
 		echo "<link rel=\"stylesheet\" href=\"../../style.css\">"
55
-		echo "<title>$REPO_NAME :: $COMMIT_HASH</title>"
56
-		echo "<h1><a href=\"../index.html\" title=\"Back to Repository\">&larr;&#xFE0E;</a> $REPO_NAME :: $COMMIT_HASH</h1>"
57
+		echo "<title>$_REPO_NAME :: $_COMMIT_HASH</title>"
58
+		echo "<h1><a href=\"../index.html\" title=\"Back to Repository\">&larr;&#xFE0E;</a> $_REPO_NAME :: $_COMMIT_HASH</h1>"
59
 		echo "<hr>"
60
 		echo "<table id=\"main\" cellpadding=\"0\" cellspacing=\"0\">"
61
-	} > $WWW_DIR/$REPO_NAME/commit/$COMMIT_HASH.html
62
+	} > $WWW_DIR/$_REPO_NAME/commit/$_COMMIT_HASH.html
63
 }
64
 
65
 generate_footer() {
66
-	local DATE=$(date +"%m/%d/%y")
67
-	echo "<div id=\"footer\">site generated by <a href=\"https://github.com/acidvegas/stagit\" target=\"_blank\">stagit</a> on <a href=\"#\">$DATE</a></div>" >> $1
68
+	_DATE=$(date +"%m/%d/%y")
69
+	echo "<div id=\"footer\">site generated by <a href=\"https://github.com/acidvegas/stagit\" target=\"_blank\">stagit</a> on <a href=\"#\">$_DATE</a></div>" >> $1
70
 }
71
 
72
 [ ! -d $REPO_DIR ] && echo "'$REPO_DIR' directory does not exist" && exit 1