-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speedup execution and normalize configuration (#77)
This is a rewrite of how we handle environment variables and subshells. This means that old configuration will no longer work. To fix this backup and remove ${HOME}/.config/sbp and change the casing of 'sbp_path' to 'SBP_PATH' in your ${HOME}/.bashrc. These changes were nessesary to make the code readable when moving away from using subshells.
- Loading branch information
Showing
138 changed files
with
5,007 additions
and
1,631 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
language: bash | ||
dist: trusty | ||
sudo: required | ||
dist: bionic | ||
email: false | ||
addons: | ||
apt: | ||
packages: | ||
- bc | ||
script: ./test | ||
before_install: | ||
- sudo apt-get install npm -y | ||
- sudo npm install -g bats | ||
script: ./bin/run_tests && ./bin/package | ||
deploy: | ||
provider: releases | ||
api_key: | ||
secure: c5h0E4QkBWe7Bka6mkowP/z6QEiqwKGV5/E9MhX9COzxhtQGlDa7rYJ7AlS43o9sXOqJR7P8Hq5KJAXqYoOamKpXB7M+1IGlDjeVB8uHBKZ/53Iwj6ZUrnXvmIrbY3X6Cr2cK2JVkmKeHx4MhT3HZKCv+MGbA3EfcIghEk/KSi8GcP84oqMLLvOhXStvVgOh2n80w4KUlqXct7DWBTc8kZAhlp2jFXBXOTdk7ihwGzS98qvHyFEO+asW63PwqpCAj74Qmj9KECIStTWGr/ieArpIuoWMVB3yvmmmZkAcm0hckwdgnwcwS47MWo3PDoUO/QuAy0CoVdWGmkz+NekudXrN7xTuTgP0afA5VF0hX7DtDsu18BoiQonauAfImNz5dYVonqMXqHSVZXcwCuyAs/zfbpFVjrngUnPrZN+rD/NwdAB3EbTIFHdQz3dqsrFhKbeHzg2dQv6NNUn9FY/hD7kol2xODONLk0A8tnZwEVRLEKSA/aBPcjh1gq63im4DpONUpf2EjtHSWVJ/kaqiKgc+kQGeF/KdH36O57qP5ttiZuYmjftiNS2n6vlu2ODgQiBrwVlbTXOdR2+lYLrQKF26L7IvslLX7PJUG9S79OjSxob/+NyuFgKYbD0SUT7nN6enwS1UVi3vO+LOJkWmq3fFULjy3stbcreH9L48iTs= | ||
file: sbp-v${TRAVIS_TAG}.tar.gz | ||
on: | ||
tags: true | ||
skip_cleanup: 'true' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,27 @@ | ||
FROM ubuntu | ||
|
||
RUN apt-get update && apt-get install -y git bash curl | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
ADD . /sbp | ||
|
||
ENV USER root | ||
RUN apt-get update && \ | ||
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \ | ||
apt-get install -y git bash curl apt-utils dialog | ||
|
||
RUN adduser --system --shell /bin/bash --disabled-password sbp && \ | ||
apt-get install -y locales && \ | ||
locale-gen en_US.UTF-8 && \ | ||
dpkg-reconfigure locales && \ | ||
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 | ||
|
||
copy . /sbp | ||
|
||
RUN chown -R sbp /sbp | ||
|
||
USER sbp | ||
|
||
ENV USER sbp | ||
ENV LC_ALL en_US.UTF-8 | ||
|
||
WORKDIR /home/sbp | ||
|
||
RUN touch .bashrc && /sbp/bin/install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#! /usr/bin/env bash | ||
|
||
base_path=$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd ) | ||
|
||
cd "$base_path" | ||
|
||
tar -zcvf "sbp-v${TRAVIS_TAG}.tar.gz" sbp.bash src config README.md LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#! /usr/bin/env bash | ||
|
||
set -e | ||
|
||
SBP_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd ) | ||
export SBP_PATH | ||
|
||
shellcheck -x --severity=error sbp.bash src/main.bash | ||
|
||
bats -r test/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#! /usr/bin/env bash | ||
|
||
set -e | ||
|
||
base_path=$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd ) | ||
|
||
sudo docker build -t brujoand/sbp:local "$base_path" | ||
sudo docker run -it brujoand/sbp:local bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,50 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Color configuration for the segments. | ||
# Check the actualy colors ofr the current theme | ||
# Using 'sbp colors' | ||
# See src/colors/*.bash for the color values | ||
|
||
settings_command_color_primary=$color04 | ||
settings_command_color_secondary=$color01 | ||
settings_command_color_primary_error=$color08 | ||
settings_command_color_secondary_error=$color04 | ||
SEGMENTS_COMMAND_COLOR_PRIMARY=$color4 | ||
SEGMENTS_COMMAND_COLOR_SECONDARY=$color1 | ||
SEGMENTS_COMMAND_COLOR_PRIMARY_HIGHLIGHT=$color8 | ||
SEGMENTS_COMMAND_COLOR_SECONDARY_HIGHLIGHT=$color4 | ||
|
||
settings_git_color_primary=$color0A | ||
settings_git_color_secondary=$color01 | ||
SEGMENTS_GIT_COLOR_PRIMARY=$color10 | ||
SEGMENTS_GIT_COLOR_SECONDARY=$color1 | ||
|
||
settings_host_color_primary=$color02 | ||
settings_host_color_secondary=$color05 | ||
settings_host_root_color_primary=$color09 | ||
settings_host_root_color_secondary=$color00 | ||
SEGMENTS_HOST_COLOR_PRIMARY=$color2 | ||
SEGMENTS_HOST_COLOR_SECONDARY=$color5 | ||
SEGMENTS_HOST_COLOR_PRIMARY_HIGHLIGHT=$color9 | ||
SEGMENTS_HOST_COLOR_SECONDARY_HIGHLIGHT=$color0 | ||
|
||
settings_path_color_primary=$color0E | ||
settings_path_color_secondary=$color07 | ||
settings_path_splitter_color=$color04 | ||
SEGMENTS_PATH_COLOR_PRIMARY=$color14 | ||
SEGMENTS_PATH_COLOR_SECONDARY=$color7 | ||
SEGMENTS_PATH_SPLITTER_COLOR=$color4 | ||
|
||
settings_path_readonly_color_secondary=$color0F | ||
settings_path_readonly_color_primary=$color1 | ||
SEGMENTS_PATH_READONLY_COLOR_SECONDARY=$color15 | ||
SEGMENTS_PATH_READONLY_COLOR_PRIMARY=$color1 | ||
|
||
settings_prompt_ready_color_primary='' | ||
settings_prompt_ready_color_secondary=$color04 | ||
settings_prompt_ready_vi_insert_color=$color04 | ||
settings_prompt_ready_vi_command_color=$color0E | ||
SEGMENTS_PROMPT_READY_COLOR_PRIMARY='' | ||
SEGMENTS_PROMPT_READY_COLOR_SECONDARY=$color4 | ||
|
||
settings_python_virtual_env_color_primary=$color09 | ||
settings_python_virtual_env_color_secondary=$color0F | ||
SEGMENTS_PYTHON_ENV_COLOR_PRIMARY=$color9 | ||
SEGMENTS_PYTHON_ENV_COLOR_SECONDARY=$color15 | ||
|
||
settings_return_code_color_primary=$color1 | ||
settings_return_code_color_secondary=$color0F | ||
SEGMENTS_RETURN_CODE_COLOR_PRIMARY=$color1 | ||
SEGMENTS_RETURN_CODE_COLOR_SECONDARY=$color15 | ||
|
||
settings_timestamp_color_primary=$color02 | ||
settings_timestamp_color_secondary=$color05 | ||
SEGMENTS_TIMESTAMP_COLOR_PRIMARY=$color2 | ||
SEGMENTS_TIMESTAMP_COLOR_SECONDARY=$color5 | ||
|
||
settings_aws_color_primary=$color08 | ||
settings_aws_color_secondary=$color09 | ||
SEGMENTS_AWS_COLOR_PRIMARY=$color8 | ||
SEGMENTS_AWS_COLOR_SECONDARY=$color9 | ||
|
||
settings_openshift_color_primary=$color03 | ||
settings_openshift_color_secondary=$color07 | ||
SEGMENTS_K8S_COLOR_PRIMARY=$color3 | ||
SEGMENTS_K8S_COLOR_SECONDARY=$color7 | ||
|
||
settings_rescuetime_color_primary=$color09 | ||
settings_rescuetime_color_secondary=$color0F | ||
settings_rescuetime_splitter_color=$color07 | ||
SEGMENTS_RESCUETIME_COLOR_PRIMARY=$color11 | ||
SEGMENTS_RESCUETIME_COLOR_SECONDARY=$color4 | ||
SEGMENTS_RESCUETIME_SPLITTER_COLOR=$color7 | ||
|
||
SEGMENTS_WTTR_COLOR_PRIMARY=$color11 | ||
SEGMENTS_WTTR_COLOR_SECONDARY=$color4 | ||
SEGMENTS_WTTR_SPLITTER_COLOR=$color7 |
Oops, something went wrong.