Added anti-redefinition headers to library scripts.

This commit is contained in:
Matias Barcenas 2017-08-22 14:23:08 -05:00
parent e544afc674
commit 39afb4c8b7
10 changed files with 24 additions and 8 deletions

View File

@ -1,6 +1,7 @@
#!/bin/bash
ArrayUtilsVersion="1.0"
if [ "$ArrayUtilsVersion" ]; then return 0; fi
readonly ArrayUtilsVersion="1.0"
# Due to the fact we're passing arrays via indirection,
# we've got to mangle variable names used within array

View File

@ -1,6 +1,7 @@
#!/bin/bash
SandboxUtilsVersion="1.0"
if [ "$ColorUtilsVersion" ]; then return 0; fi
readonly ColorUtilsVersion="1.0"
################################# < Shell Color Codes > ################################
readonly CRed="\e[1;31m"

View File

@ -1,5 +1,8 @@
#!/bin/bash
if [ "$FormatUtilsVersion" ]; then return 0; fi
readonly FormatUtilsVersion="1.0"
FormatTabLength=8
FormatValidSpecifiers='%([+-]?([0-9]+|\*)?(\.([0-9]+|\*))?)?[bqdiouxXfeEgGcsnaA]'

View File

@ -1,6 +1,7 @@
#!/bin/bash
HashUtilsVersion="1.0"
if [ "$HashUtilsVersion" ]; then return 0; fi
readonly HashUtilsVersion="1.0"
HashOutputDevice="/dev/stdout"

View File

@ -1,6 +1,7 @@
#!/bin/bash
IOUtilsVersion="1.0"
if [ "$IOUtilsVersion" ]; then return 0; fi
readonly IOUtilsVersion="1.0"
IOUtilsHeader="[x] ================================ [x]"
IOUtilsQueryMark="[-] "

View File

@ -1,8 +1,10 @@
#!/bin/bash
if [ "$InterfaceUtilsVersion" ]; then return 0; fi
readonly InterfaceUtilsVersion="1.0"
# The methods used in this script are taken from airmon-ng.
# This is all thanks for the airmon-ng authors, thanks guys.
InterfaceUtilsOutputDevice="/dev/stdout"
if [ -d /sys/bus/usb ] # && hash lsusb

View File

@ -1,6 +1,7 @@
#!/bin/bash
SandboxUtilsVersion="1.0"
if [ "$SandboxUtilsVersion" ]; then return 0; fi
readonly SandboxUtilsVersion="1.0"
SandboxWorkspacePath="/tmp/sandbox"
SandboxOutputDevice="/dev/stdout"

View File

@ -1,5 +1,8 @@
#!/bin/bash
if [ "$APServiceVersion" ]; then return 0; fi
readonly APServiceVersion="1.0"
VIGW="at0"
VIAP=$WIAccessPoint

View File

@ -1,5 +1,8 @@
#!/bin/bash
if [ "$APServiceVersion" ]; then return 0; fi
readonly APServiceVersion="1.0"
VIGW=$WIAccessPoint
VIAP=$WIAccessPoint

View File

@ -1,7 +1,7 @@
#!/bin/bash
#if [ "$InstallerUtilsVersion" ]; then return 0; fi
# readonly InstallerUtilsVersion="1.0"
if [ "$InstallerUtilsVersion" ]; then return 0; fi
readonly InstallerUtilsVersion="1.0"
InstallerUtilsWorkspacePath="/tmp/verspace"