Skip to content

Commit

Permalink
New synthia [bash-framework] name
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas North committed Jun 21, 2018
1 parent 31f06ab commit 90d9e0e
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 28 deletions.
18 changes: 9 additions & 9 deletions functions
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash

### openspace bash-framework v0.1.7 [https://github.com/openspace42/bash-framework]
### openspace synthia bootstrap framework v0.2.0 [https://github.com/openspace42/synthia]

os_bash_functions_version=0.2.3
os_dna_version=0.2.4

################################################################################

Expand Down Expand Up @@ -46,11 +46,11 @@ check_root() {

}

download_os_functions() {
download_os_dna() {

clone_host="https://github.com"
clone_author="openspace42"
clone_name="bash-functions"
clone_name="dna"

clone_base_dir=/root/$clone_author
clone_dir=$clone_base_dir/$clone_name
Expand All @@ -63,10 +63,10 @@ download_os_functions() {
fi

( cd "$clone_base_dir" && git clone "$clone_host/$clone_author/$clone_name" && cd "$clone_name" && \
if [ ! "${custom_bf-null}" = "e" ]; \
if [ ! "${custom_dna_version-null}" = "b" ]; \
then \
git checkout "tags/v$os_bash_functions_version" && \
echo "$os_bash_functions_version" > "./version_installed"; \
git checkout "tags/v$os_dna_version" && \
echo "$os_dna_version" > "./version_installed"; \
else \
clone_latest_commit="$(git log -n 1 --pretty=format:"%H" | cut -c1-7)" && \
echo "bleeding-edge-$clone_latest_commit" > "./version_installed"; \
Expand All @@ -75,9 +75,9 @@ download_os_functions() {

}

source_os_functions() {
source_os_dna() {

for f in /root/openspace42/bash-functions/functions/*
for f in /root/openspace42/dna/functions/*
do
. $f
done
Expand Down
2 changes: 1 addition & 1 deletion install
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fi

### Source openspace functions file

source_os_functions
source_os_dna

### Define formatting

Expand Down
31 changes: 15 additions & 16 deletions setup
Original file line number Diff line number Diff line change
Expand Up @@ -39,32 +39,31 @@ check_root

### Evaluate command arguments for custom-version install

while getopts ":b:r:" arguments
while getopts ":d:p:" arguments
do
case $arguments in
b) export custom_bf="$OPTARG"
d) export custom_dna_version="$OPTARG"
;;
r) export custom_rc="$OPTARG"
p) export custom_project_version="$OPTARG"
;;
\?) echo "Invalid option | -$OPTARG | for function | ${FUNCNAME[0]} |."
echo
exit
;;
esac
done

OPTIND=1

if [ ! -z "${custom_bf-}" ]
if [ ! -z "${custom_dna_version-}" ]
then
case $custom_bf in
e) echo "Using bleeding-edge bash-functions as per | -b e |."
case $custom_dna_version in
b) echo "Using bleeding-edge dna version as per | -d b |."
echo
;;
l) echo "Disabling bash-functions download and using local version as per | -b l |."
l) echo "Disabling dna download and using local version as per | -d l |."
echo
;;
*) echo "Invalid content for | custom_bf | in function | ${FUNCNAME[0]} |."
*) echo "Invalid content for | custom_dna_version | in function | ${FUNCNAME[0]} |."
echo
echo "Exiting..."
echo
Expand All @@ -73,13 +72,13 @@ then
esac
fi

if [ ! -z "${custom_rc-}" ]
if [ ! -z "${custom_project_version-}" ]
then
case $custom_rc in
e) echo "Using bleeding-edge repo code as per | -r e |."
case $custom_project_version in
b) echo "Using bleeding-edge project version as per | -p b |."
echo
;;
*) echo "Invalid content for | custom_rc | in function | ${FUNCNAME[0]} |."
*) echo "Invalid content for | custom_project_version | in function | ${FUNCNAME[0]} |."
echo
echo "Exiting..."
echo
Expand All @@ -90,14 +89,14 @@ fi

### Download and source openspace functions file

if [ ! "${custom_bf-null}" = "l" ]
if [ ! "${custom_dna_version-null}" = "l" ]
then

download_os_functions
download_os_dna

fi

source_os_functions
source_os_dna

### Define formatting

Expand Down
2 changes: 1 addition & 1 deletion tools/aenigma-backup
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fi

### Source openspace functions file

source_os_functions
source_os_dna

### Define formatting

Expand Down
2 changes: 1 addition & 1 deletion tools/aenigma-restore
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fi

### Source openspace functions file

source_os_functions
source_os_dna

### Define formatting

Expand Down

0 comments on commit 90d9e0e

Please sign in to comment.