refactor apps
This commit is contained in:
@@ -1,28 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m'
|
||||
|
||||
print_info() {
|
||||
echo -e "${BLUE}📘${NC} $1"
|
||||
}
|
||||
|
||||
print_success() {
|
||||
echo -e "${GREEN}✅${NC} $1"
|
||||
}
|
||||
|
||||
print_error() {
|
||||
echo -e "${RED}❌${NC} $1"
|
||||
}
|
||||
|
||||
print_warning() {
|
||||
echo -e "${YELLOW}⚡${NC} $1"
|
||||
}
|
||||
source "$(dirname "$0")/../common.sh"
|
||||
|
||||
HOSTNAME="${1:-$(scutil --get LocalHostName 2>/dev/null || hostname -s)}"
|
||||
|
||||
@@ -30,4 +9,4 @@ print_info "Applying configuration for $HOSTNAME"
|
||||
|
||||
nix run nix-darwin -- switch --flake ".#$HOSTNAME" "${@:2}"
|
||||
|
||||
print_success "Configuration applied successfully"
|
||||
print_success "Configuration applied successfully"
|
||||
|
||||
@@ -1,28 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m'
|
||||
|
||||
print_info() {
|
||||
echo -e "${BLUE}📘${NC} $1"
|
||||
}
|
||||
|
||||
print_success() {
|
||||
echo -e "${GREEN}✅${NC} $1"
|
||||
}
|
||||
|
||||
print_error() {
|
||||
echo -e "${RED}❌${NC} $1"
|
||||
}
|
||||
|
||||
print_warning() {
|
||||
echo -e "${YELLOW}⚡${NC} $1"
|
||||
}
|
||||
source "$(dirname "$0")/../common.sh"
|
||||
|
||||
HOSTNAME="${1:-$(scutil --get LocalHostName 2>/dev/null || hostname -s)}"
|
||||
|
||||
@@ -34,4 +13,4 @@ if [[ -L ./result ]]; then
|
||||
unlink ./result
|
||||
fi
|
||||
|
||||
print_success "Build completed successfully"
|
||||
print_success "Build completed successfully"
|
||||
|
||||
@@ -1,28 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m'
|
||||
|
||||
print_info() {
|
||||
echo -e "${BLUE}📘${NC} $1"
|
||||
}
|
||||
|
||||
print_success() {
|
||||
echo -e "${GREEN}✅${NC} $1"
|
||||
}
|
||||
|
||||
print_error() {
|
||||
echo -e "${RED}❌${NC} $1"
|
||||
}
|
||||
|
||||
print_warning() {
|
||||
echo -e "${YELLOW}⚡${NC} $1"
|
||||
}
|
||||
source "$(dirname "$0")/../common.sh"
|
||||
|
||||
HOSTNAME="${1:-$(scutil --get LocalHostName 2>/dev/null || hostname -s)}"
|
||||
|
||||
@@ -45,4 +24,4 @@ if [[ -L ./result ]]; then
|
||||
unlink ./result
|
||||
fi
|
||||
|
||||
print_success "Build and switch completed successfully"
|
||||
print_success "Build and switch completed successfully"
|
||||
|
||||
@@ -1,28 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m'
|
||||
|
||||
print_info() {
|
||||
echo -e "${BLUE}📘${NC} $1"
|
||||
}
|
||||
|
||||
print_success() {
|
||||
echo -e "${GREEN}✅${NC} $1"
|
||||
}
|
||||
|
||||
print_error() {
|
||||
echo -e "${RED}❌${NC} $1"
|
||||
}
|
||||
|
||||
print_warning() {
|
||||
echo -e "${YELLOW}⚡${NC} $1"
|
||||
}
|
||||
source "$(dirname "$0")/../common.sh"
|
||||
|
||||
print_info "Available generations:"
|
||||
darwin-rebuild --list-generations
|
||||
@@ -38,4 +17,4 @@ fi
|
||||
print_warning "Rolling back to generation $GEN_NUM..."
|
||||
darwin-rebuild switch --switch-generation "$GEN_NUM"
|
||||
|
||||
print_success "Rollback to generation $GEN_NUM complete"
|
||||
print_success "Rollback to generation $GEN_NUM complete"
|
||||
|
||||
Reference in New Issue
Block a user