Skip to content

Commit 8d3910c

Browse files
committed
Remove unused utility functions and decorative output
This commit cleans up several scripts by removing: - Decorative color and header output from install.sh - OS version display in setup.sh - Unused utility functions in utils.sh related to SSH key setup, package management, and GitHub version retrieval The changes simplify the scripts and remove unnecessary code while maintaining core functionality.
1 parent 4f50661 commit 8d3910c

File tree

3 files changed

+0
-82
lines changed

3 files changed

+0
-82
lines changed

install.sh

-11
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,6 @@
33
# Exit on error
44
set -e
55

6-
# Colors for output
7-
RED='\033[0;31m'
8-
GREEN='\033[0;32m'
9-
BLUE='\033[0;34m'
10-
BOLD='\033[1m'
11-
NC='\033[0m' # No Color
12-
13-
# Print header
14-
echo -e "${BLUE}${BOLD}Omakos${NC}"
15-
echo -e "${BOLD}Turn your MacOS laptop into a fully functional development system${NC}\n"
16-
176
# Check for required commands
187
command -v curl >/dev/null 2>&1 || {
198
echo -e "${RED}Error: curl is required but not installed.${NC}" >&2

scripts/utils.sh

-70
Original file line numberDiff line numberDiff line change
@@ -491,76 +491,6 @@ cli_is_installed() {
491491
echo "$return_"
492492
}
493493

494-
copy_key_github() {
495-
inform 'Public key copied! Paste into Github…'
496-
[[ -f $pub ]] && cat $pub | pbcopy
497-
open 'https://github.com/account/ssh'
498-
read -p " ✦ Press enter to continue…"
499-
print_success "SSH key"
500-
return
501-
}
502-
503-
github_key_check() {
504-
if ask "SSH key found. Enter it in Github?" Y; then
505-
copy_key_github
506-
else
507-
print_success "SSH key"
508-
fi
509-
}
510-
511-
create_ssh_key() {
512-
if ask "No SSH key found. Create one?" Y; then
513-
ssh-keygen -t rsa
514-
github_key_check
515-
else
516-
return 0
517-
fi
518-
}
519-
520-
ssh_key_setup() {
521-
local pub=$HOME/.ssh/id_rsa.pub
522-
523-
if ! [[ -f $pub ]]; then
524-
create_ssh_key
525-
else
526-
github_key_check
527-
fi
528-
}
529-
530-
mas_setup() {
531-
if mas account >/dev/null; then
532-
return 0
533-
else
534-
return 1
535-
fi
536-
}
537-
538-
gem_install_or_update() {
539-
if gem list "$1" --installed >/dev/null; then
540-
gem update "$@"
541-
else
542-
gem install "$@"
543-
rbenv rehash
544-
fi
545-
}
546-
547-
install_npm_packages() {
548-
if [[ $(cli_is_installed $2) == 0 ]]; then
549-
echo_install "Installing $1"
550-
npm install $1 -g --silent
551-
print_in_green "${bold}✓ installed!${normal}\n"
552-
else
553-
print_success_muted "$1 already installed. Skipped."
554-
fi
555-
}
556-
557-
# The releases are returned in the format
558-
# {"id":3622206,"tag_name":"hello-1.0.0.11",…}
559-
# we have to extract the tag_name.
560-
get_github_version() {
561-
echo $1 | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/'
562-
}
563-
564494
###############################################################################
565495
# Text Formatting
566496
###############################################################################

setup.sh

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ chapter() {
2626
###############################################################################
2727

2828
source ./scripts/ascii.sh
29-
echo -e ${dim}$(get_os) $(get_os_version) ${normal}
3029

3130
printf "\nWelcome to Omakos! 🚀\n"
3231
printf "Omakos turns your new mac laptop into a full configured development system in a single command.\n"

0 commit comments

Comments
 (0)