Skip to content

Commit

Permalink
Selectable os from matrix 6
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Saporetti Junior committed Dec 6, 2023
1 parent eb1d336 commit a6c0050
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 20 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ on:
type: boolean
fedora:
description: 'Build & Test on Fedora latest ?'
default: true
default: false
required: true
type: boolean
alpine:
description: 'Build & Test on Alpine latest ?'
default: true
default: false
required: true
type: boolean
macos:
description: 'Build & Test on macOS latest ?'
default: true
default: false
required: true
type: boolean
push:
Expand Down
2 changes: 1 addition & 1 deletion bin/apps/bash/hhs-app/plugins/hspm/hspm.bash
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function version() {

# @purpose: HHS plugin required function
function cleanup() {
unset "${UNSETS[@]}"
unset -f "${UNSETS[@]}"
echo -n ''
}

Expand Down
2 changes: 1 addition & 1 deletion bin/apps/bash/hhs-app/plugins/setup/setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function version() {

# @purpose: HHS plugin required function
function cleanup() {
unset "${UNSETS[@]}"
unset -f "${UNSETS[@]}"
echo -n ''
}

Expand Down
2 changes: 1 addition & 1 deletion bin/apps/bash/hhs-app/plugins/starship/starship.bash
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function version() {

# @purpose: HHS plugin required function
function cleanup() {
unset "${UNSETS[@]}"
unset -f "${UNSETS[@]}"
echo -n ''
}

Expand Down
2 changes: 1 addition & 1 deletion bin/apps/bash/hhs-app/plugins/updater/updater.bash
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function version() {

# @purpose: HHS plugin required function
function cleanup() {
unset "${UNSETS[@]}"
unset -f "${UNSETS[@]}"
echo -n ''
}

Expand Down
2 changes: 1 addition & 1 deletion bin/dev-tools/bash/hhs-git-tools.bash
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if __hhs_has "git"; then
__hhs_errcho "${FUNCNAME[0]}: Not a git repository"
return 1
else
[[ "$1" == "-l" || "$1" == "--local" ]] && unset all_flag && all_str='\b'
[[ "$1" == "-l" || "$1" == "--local" ]] && unset -f all_flag && all_str='\b'
clear
if [[ -n "${all_flag}" ]]; then
echo -en "${YELLOW}=> Updating branches ${NC}"
Expand Down
2 changes: 1 addition & 1 deletion bin/hhs-functions/bash/hhs-taylor.bash
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function __hhs_tailor() {
done <"${file}"
else
[[ -f "${file}" ]] && touch "${file}"
[[ ${#args[@]} -le 1 && -z ${args[0]} ]] && unset args
[[ ${#args[@]} -le 1 && -z ${args[0]} ]] && unset -f args
# shellcheck disable=SC2068
tail ${args[@]} "${file}" | sed ${sed_flag} \
-e "s/\[(${HHS_TAILOR_THREAD_NAME_RE})\]/\[${HHS_TAILOR_THREAD_NAME_COLOR}\1${NC}\]/g" \
Expand Down
3 changes: 3 additions & 0 deletions dotfiles/bash/bash_icons.bash
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ CHECK_ICN="\xef\x81\x98"
CROSS_ICN="\xef\x81\x97"
FAIL_ICN="\xef\x91\xa7"
FUNC_ICN="\xef\x84\xae"
HAND_PEACE_ICN='\xef\x89\x9b'
OFF_ICN="\xef\x88\x84"
ON_ICN="\xef\x88\x85"
PASS_ICN="\xef\x98\xab"
POINTER_ICN='\xef\x90\xb2'
SKIP_ICN="\xef\x81\x99"
STAR_ICN="\xef\x80\x85"
TEST_FAIL_ICN="\xef\x91\xae"
TEST_PASS_ICN="\xef\x98\xac"

28 changes: 17 additions & 11 deletions install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ Usage: $APP_NAME [OPTIONS] <args>
bash)
# Creating the shell-opts file
echo -en "\n${WHITE}Creating the Shell Options file ${BLUE}${HHS_SHOPTS_FILE} ..."
\shopt | awk '{print $1" = "$2}' > "${HHS_SHOPTS_FILE}" || quit 2 "Unable to create the Shell Options file !"
\shopt | awk '{print $1" = "$2}' >"${HHS_SHOPTS_FILE}" || quit 2 "Unable to create the Shell Options file !"
echo -e " ${GREEN}OK${NC}"
;;
esac
Expand Down Expand Up @@ -797,6 +797,17 @@ Usage: $APP_NAME [OPTIONS] <args>
# Reload the terminal and apply installed files.
activate_dotfiles() {

# Set the auto-update timestamp.
if [[ "${HHS_MY_OS_RELEASE}" == "macOS" ]]; then
\date -v+7d '+%s%S' 1>"${HHS_DIR}/.last_update" 2>>"${INSTALL_LOG}"
elif [[ "${HHS_MY_OS_RELEASE}" == "alpine" ]]; then
\date -d "@$(($( \date +%s) - 3 * 24 * 60 * 60))" '+%s%S' 1>"${HHS_DIR}/.last_update" 2>>"${INSTALL_LOG}"
elif [[ "${HHS_MY_OS_RELEASE}" =~ ubuntu|fedora|centos ]]; then
\date -d '+7 days' '+%s%S' 1>"${HHS_DIR}/.last_update" 2>>"${INSTALL_LOG}"
else
\date '+%s' 1>"${HHS_DIR}/.last_update" 2>>"${INSTALL_LOG}"
fi

echo ''
echo -e "${GREEN}${POINTER_ICN} Done installing HomeSetup v$(cat "${HHS_HOME}/.VERSION") !"
echo -e "${BLUE}"
Expand All @@ -817,17 +828,11 @@ Usage: $APP_NAME [OPTIONS] <args>
echo -e "${YELLOW}${STAR_ICN} For details about your new Terminal type: ${BLUE}$ more ${README_LINK}"
echo -e "${NC}"

if [[ "macOS" == "${HHS_MY_OS_RELEASE}" ]]; then
\date -v+7d '+%s%S' 1>"${HHS_DIR}/.last_update" 2>/dev/null
elif [[ "alpine" == "${MY_OS}" ]]; then
\date -d "@$(($( \date +%s) - 3 * 24 * 60 * 60))" '+%s%S' 1>"${HHS_DIR}/.last_update" 2>/dev/null
else
\date -d '+7 days' '+%s%S' 1>"${HHS_DIR}/.last_update" 2>/dev/null
fi

echo -e "\nHomeSetup installation finished: $(date)" >>"${INSTALL_LOG}"
\mv "${INSTALL_LOG}" "${HHS_LOG_DIR}"
quit 0

# Move the installation log to logs folder
[[ -s "${INSTALL_LOG}" && -d "${HHS_LOG_DIR}" ]] &&
\mv "${INSTALL_LOG}" "${HHS_LOG_DIR}"
}

abort_install() {
Expand All @@ -842,4 +847,5 @@ Usage: $APP_NAME [OPTIONS] <args>
check_inst_method "$@"
install_homesetup
check_prefix
quit 0
}

0 comments on commit a6c0050

Please sign in to comment.