Preamble actually isn't needed

variables come from the calling script
This commit is contained in:
Bob Mottram 2016-06-30 15:08:55 +01:00
parent c14f73af67
commit bfa480ef13
No known key found for this signature in database
GPG Key ID: BA68F26108DC9F87
1 changed files with 0 additions and 43 deletions

View File

@ -28,49 +28,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
NO_OF_ARGS=$#
PROJECT_NAME='freedombone'
export TEXTDOMAIN=$PROJECT_NAME-utils-git
export TEXTDOMAINDIR="/usr/share/locale"
# An optional configuration file which overrides some of these variables
CONFIGURATION_FILE="${PROJECT_NAME}.cfg"
if [ -f ~/${PROJECT_NAME}.cfg ]; then
CONFIGURATION_FILE=~/${PROJECT_NAME}.cfg
fi
# friends repo mirrors
FRIENDS_MIRRORS_SERVER=
FRIENDS_MIRRORS_PASSWORD=
FRIENDS_MIRRORS_SSH_PORT=
function get_friends_servers {
if [ -f $CONFIGURATION_FILE ]; then
if grep -q "FRIENDS_MIRRORS_SERVER" $CONFIGURATION_FILE; then
FRIENDS_MIRRORS_SERVER=$(grep "FRIENDS_MIRRORS_SERVER" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "FRIENDS_MIRRORS_PASSWORD" $CONFIGURATION_FILE; then
FRIENDS_MIRRORS_PASSWORD=$(grep "FRIENDS_MIRRORS_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "FRIENDS_MIRRORS_SSH_PORT" $CONFIGURATION_FILE; then
FRIENDS_MIRRORS_SSH_PORT=$(grep "FRIENDS_MIRRORS_SSH_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
fi
if [ ! $FRIENDS_MIRRORS_SERVER ]; then
echo "1"
return
fi
if [ ${#FRIENDS_MIRRORS_SERVER} -lt 2 ]; then
echo "1"
return
fi
echo "0"
}
function git_clone {
repo_url="$1"
destination_dir="$2"