mirror of
https://github.com/tw93/Mole.git
synced 2026-02-15 07:35:07 +00:00
refactor: rename installers command to installer across commands, script, and documentation.
This commit is contained in:
@@ -49,7 +49,7 @@ mo optimize # Refresh caches & services
|
|||||||
mo analyze # Visual disk explorer
|
mo analyze # Visual disk explorer
|
||||||
mo status # Live system health dashboard
|
mo status # Live system health dashboard
|
||||||
mo purge # Clean project build artifacts
|
mo purge # Clean project build artifacts
|
||||||
mo installers # Find and remove installer files
|
mo installer # Find and remove installer files
|
||||||
|
|
||||||
mo touchid # Configure Touch ID for sudo
|
mo touchid # Configure Touch ID for sudo
|
||||||
mo completion # Setup shell tab completion
|
mo completion # Setup shell tab completion
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Mole - Installers command
|
# Mole - Installer command
|
||||||
# Highlights and helps remove installer files (.dmg, .pkg, .mpkg, .iso, .xip, .zip)
|
# Find and remove installer files (.dmg, .pkg, .mpkg, .iso, .xip, .zip)
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
@@ -270,37 +270,15 @@ show_summary() {
|
|||||||
printf '\n'
|
printf '\n'
|
||||||
}
|
}
|
||||||
|
|
||||||
show_help() {
|
|
||||||
echo -e "${PURPLE_BOLD}Mole Installers${NC} - Find and remove installer files"
|
|
||||||
echo ""
|
|
||||||
echo -e "${YELLOW}Usage:${NC} mo installers [options]"
|
|
||||||
echo ""
|
|
||||||
echo -e "${YELLOW}Options:${NC}"
|
|
||||||
echo " --debug Enable debug logging"
|
|
||||||
echo " --help Show this help message"
|
|
||||||
echo ""
|
|
||||||
echo -e "${YELLOW}Default Paths${NC}"
|
|
||||||
echo " - ${HOME}/Downloads"
|
|
||||||
echo " - ${HOME}/Desktop"
|
|
||||||
echo " - ${HOME}/Documents"
|
|
||||||
echo " - ${HOME}/Public"
|
|
||||||
echo " - ${HOME}/Library/Downloads"
|
|
||||||
echo " - /Users/Shared"
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
"--help")
|
|
||||||
show_help
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"--debug")
|
"--debug")
|
||||||
export MO_DEBUG=1
|
export MO_DEBUG=1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown option: $arg"
|
echo "Unknown option: $arg"
|
||||||
echo "Use 'mo installers --help' for usage information"
|
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -311,7 +289,7 @@ main() {
|
|||||||
printf '\033[2J\033[H'
|
printf '\033[2J\033[H'
|
||||||
fi
|
fi
|
||||||
printf '\n'
|
printf '\n'
|
||||||
echo -e "${PURPLE_BOLD}Find & Remove Installers${NC}"
|
echo -e "${PURPLE_BOLD}Clean Installer Files${NC}"
|
||||||
|
|
||||||
hide_cursor
|
hide_cursor
|
||||||
perform_installers
|
perform_installers
|
||||||
@@ -8,7 +8,7 @@ MOLE_COMMANDS=(
|
|||||||
"analyze:Explore disk usage"
|
"analyze:Explore disk usage"
|
||||||
"status:Monitor system health"
|
"status:Monitor system health"
|
||||||
"purge:Remove old project artifacts"
|
"purge:Remove old project artifacts"
|
||||||
"installers:Find and remove installer files"
|
"installer:Find and remove installer files"
|
||||||
"touchid:Configure Touch ID for sudo"
|
"touchid:Configure Touch ID for sudo"
|
||||||
"completion:Setup shell tab completion"
|
"completion:Setup shell tab completion"
|
||||||
"update:Update to latest version"
|
"update:Update to latest version"
|
||||||
|
|||||||
5
mole
5
mole
@@ -222,7 +222,6 @@ show_help() {
|
|||||||
printf " %s%-28s%s %s\n" "$GREEN" "mo optimize --dry-run" "$NC" "Preview optimization"
|
printf " %s%-28s%s %s\n" "$GREEN" "mo optimize --dry-run" "$NC" "Preview optimization"
|
||||||
printf " %s%-28s%s %s\n" "$GREEN" "mo optimize --whitelist" "$NC" "Manage protected items"
|
printf " %s%-28s%s %s\n" "$GREEN" "mo optimize --whitelist" "$NC" "Manage protected items"
|
||||||
printf " %s%-28s%s %s\n" "$GREEN" "mo purge --paths" "$NC" "Configure scan directories"
|
printf " %s%-28s%s %s\n" "$GREEN" "mo purge --paths" "$NC" "Configure scan directories"
|
||||||
printf " %s%-28s%s %s\n" "$GREEN" "mo installers --debug" "$NC" "Find installer files"
|
|
||||||
echo
|
echo
|
||||||
printf "%s%s%s\n" "$BLUE" "OPTIONS" "$NC"
|
printf "%s%s%s\n" "$BLUE" "OPTIONS" "$NC"
|
||||||
printf " %s%-28s%s %s\n" "$GREEN" "--debug" "$NC" "Show detailed operation logs"
|
printf " %s%-28s%s %s\n" "$GREEN" "--debug" "$NC" "Show detailed operation logs"
|
||||||
@@ -749,8 +748,8 @@ main() {
|
|||||||
"purge")
|
"purge")
|
||||||
exec "$SCRIPT_DIR/bin/purge.sh" "${args[@]:1}"
|
exec "$SCRIPT_DIR/bin/purge.sh" "${args[@]:1}"
|
||||||
;;
|
;;
|
||||||
"installers")
|
"installer")
|
||||||
exec "$SCRIPT_DIR/bin/installers.sh" "${args[@]:1}"
|
exec "$SCRIPT_DIR/bin/installer.sh" "${args[@]:1}"
|
||||||
;;
|
;;
|
||||||
"touchid")
|
"touchid")
|
||||||
exec "$SCRIPT_DIR/bin/touchid.sh" "${args[@]:1}"
|
exec "$SCRIPT_DIR/bin/touchid.sh" "${args[@]:1}"
|
||||||
|
|||||||
@@ -37,41 +37,13 @@ setup() {
|
|||||||
rm -rf "${HOME:?}/Documents"/*
|
rm -rf "${HOME:?}/Documents"/*
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test help and arguments
|
# Test arguments
|
||||||
|
|
||||||
@test "installers.sh --help shows usage information" {
|
@test "installer.sh rejects unknown options" {
|
||||||
run "$PROJECT_ROOT/bin/installers.sh" --help
|
run "$PROJECT_ROOT/bin/installer.sh" --unknown-option
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
|
||||||
[[ "$output" == *"Mole Installers"* ]]
|
|
||||||
[[ "$output" == *"Usage:"* ]]
|
|
||||||
[[ "$output" == *"mo installers"* ]]
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "installers.sh --help lists options and paths" {
|
|
||||||
run "$PROJECT_ROOT/bin/installers.sh" --help
|
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
|
||||||
[[ "$output" == *"--debug"* ]]
|
|
||||||
[[ "$output" == *"--help"* ]]
|
|
||||||
[[ "$output" == *"mo installers"* ]]
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "installers.sh --help shows scan scope" {
|
|
||||||
run "$PROJECT_ROOT/bin/installers.sh" --help
|
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
|
||||||
[[ "$output" == *"Downloads"* ]]
|
|
||||||
[[ "$output" == *"Desktop"* ]]
|
|
||||||
[[ "$output" == *"Documents"* ]]
|
|
||||||
}
|
|
||||||
|
|
||||||
@test "installers.sh rejects unknown options" {
|
|
||||||
run "$PROJECT_ROOT/bin/installers.sh" --unknown-option
|
|
||||||
|
|
||||||
[ "$status" -eq 1 ]
|
[ "$status" -eq 1 ]
|
||||||
[[ "$output" == *"Unknown option"* ]]
|
[[ "$output" == *"Unknown option"* ]]
|
||||||
[[ "$output" == *"--help"* ]]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test scan_installers_in_path function directly
|
# Test scan_installers_in_path function directly
|
||||||
@@ -92,7 +64,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source "$1"
|
source "$1"
|
||||||
scan_installers_in_path "$2"
|
scan_installers_in_path "$2"
|
||||||
' bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/Downloads"
|
' bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/Downloads"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" == *"Chrome.dmg"* ]]
|
[[ "$output" == *"Chrome.dmg"* ]]
|
||||||
@@ -112,7 +84,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source "$1"
|
source "$1"
|
||||||
scan_installers_in_path "$2"
|
scan_installers_in_path "$2"
|
||||||
' bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/Downloads"
|
' bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/Downloads"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" == *"App1.dmg"* ]]
|
[[ "$output" == *"App1.dmg"* ]]
|
||||||
@@ -136,7 +108,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source "$1"
|
source "$1"
|
||||||
scan_installers_in_path "$2"
|
scan_installers_in_path "$2"
|
||||||
' bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/Downloads"
|
' bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/Downloads"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
# Default max depth is 2
|
# Default max depth is 2
|
||||||
@@ -159,7 +131,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source \"\$1\"
|
source \"\$1\"
|
||||||
scan_installers_in_path \"\$2\"
|
scan_installers_in_path \"\$2\"
|
||||||
" bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/Downloads"
|
" bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/Downloads"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" == *"top.dmg"* ]]
|
[[ "$output" == *"top.dmg"* ]]
|
||||||
@@ -175,7 +147,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source "$1"
|
source "$1"
|
||||||
scan_installers_in_path "$2"
|
scan_installers_in_path "$2"
|
||||||
' bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/NonExistent"
|
' bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/NonExistent"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ -z "$output" ]]
|
[[ -z "$output" ]]
|
||||||
@@ -195,7 +167,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source "$1"
|
source "$1"
|
||||||
scan_installers_in_path "$2"
|
scan_installers_in_path "$2"
|
||||||
' bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/Downloads"
|
' bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/Downloads"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" != *"document.pdf"* ]]
|
[[ "$output" != *"document.pdf"* ]]
|
||||||
@@ -215,7 +187,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source "$1"
|
source "$1"
|
||||||
scan_installers_in_path "$2"
|
scan_installers_in_path "$2"
|
||||||
' bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/Downloads"
|
' bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/Downloads"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" == *"My App Installer.dmg"* ]]
|
[[ "$output" == *"My App Installer.dmg"* ]]
|
||||||
@@ -232,7 +204,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source "$1"
|
source "$1"
|
||||||
scan_installers_in_path "$2"
|
scan_installers_in_path "$2"
|
||||||
' bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/Downloads"
|
' bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/Downloads"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" == *"App-v1.2.3_beta.pkg"* ]]
|
[[ "$output" == *"App-v1.2.3_beta.pkg"* ]]
|
||||||
@@ -251,7 +223,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source "$1"
|
source "$1"
|
||||||
scan_installers_in_path "$2"
|
scan_installers_in_path "$2"
|
||||||
' bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/Downloads"
|
' bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/Downloads"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ -z "$output" ]]
|
[[ -z "$output" ]]
|
||||||
@@ -268,7 +240,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source \"\$1\"
|
source \"\$1\"
|
||||||
scan_installers_in_path \"\$2\"
|
scan_installers_in_path \"\$2\"
|
||||||
" bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/Downloads"
|
" bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/Downloads"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" == *"Chrome.dmg"* ]]
|
[[ "$output" == *"Chrome.dmg"* ]]
|
||||||
@@ -284,7 +256,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source \"\$1\"
|
source \"\$1\"
|
||||||
scan_installers_in_path \"\$2\"
|
scan_installers_in_path \"\$2\"
|
||||||
" bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/Downloads"
|
" bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/Downloads"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" == *"App1.dmg"* ]]
|
[[ "$output" == *"App1.dmg"* ]]
|
||||||
@@ -304,7 +276,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source \"\$1\"
|
source \"\$1\"
|
||||||
scan_installers_in_path \"\$2\"
|
scan_installers_in_path \"\$2\"
|
||||||
" bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/Downloads"
|
" bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/Downloads"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
# Default max depth is 2
|
# Default max depth is 2
|
||||||
@@ -323,7 +295,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source \"\$1\"
|
source \"\$1\"
|
||||||
scan_installers_in_path \"\$2\"
|
scan_installers_in_path \"\$2\"
|
||||||
" bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/Downloads"
|
" bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/Downloads"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" == *"top.dmg"* ]]
|
[[ "$output" == *"top.dmg"* ]]
|
||||||
@@ -335,7 +307,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source \"\$1\"
|
source \"\$1\"
|
||||||
scan_installers_in_path \"\$2\"
|
scan_installers_in_path \"\$2\"
|
||||||
" bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/NonExistent"
|
" bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/NonExistent"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ -z "$output" ]]
|
[[ -z "$output" ]]
|
||||||
@@ -351,7 +323,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source \"\$1\"
|
source \"\$1\"
|
||||||
scan_installers_in_path \"\$2\"
|
scan_installers_in_path \"\$2\"
|
||||||
" bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/Downloads"
|
" bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/Downloads"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" != *"document.pdf"* ]]
|
[[ "$output" != *"document.pdf"* ]]
|
||||||
@@ -384,7 +356,7 @@ setup() {
|
|||||||
else
|
else
|
||||||
echo "NOT_INSTALLER"
|
echo "NOT_INSTALLER"
|
||||||
fi
|
fi
|
||||||
' bash "$PROJECT_ROOT/bin/installers.sh"
|
' bash "$PROJECT_ROOT/bin/installer.sh"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" == "NOT_INSTALLER" ]]
|
[[ "$output" == "NOT_INSTALLER" ]]
|
||||||
@@ -407,7 +379,7 @@ setup() {
|
|||||||
else
|
else
|
||||||
echo "NOT_INSTALLER"
|
echo "NOT_INSTALLER"
|
||||||
fi
|
fi
|
||||||
' bash "$PROJECT_ROOT/bin/installers.sh"
|
' bash "$PROJECT_ROOT/bin/installer.sh"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" == "INSTALLER" ]]
|
[[ "$output" == "INSTALLER" ]]
|
||||||
@@ -431,7 +403,7 @@ setup() {
|
|||||||
else
|
else
|
||||||
echo "NOT_INSTALLER"
|
echo "NOT_INSTALLER"
|
||||||
fi
|
fi
|
||||||
' bash "$PROJECT_ROOT/bin/installers.sh"
|
' bash "$PROJECT_ROOT/bin/installer.sh"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" == "NOT_INSTALLER" ]]
|
[[ "$output" == "NOT_INSTALLER" ]]
|
||||||
@@ -453,7 +425,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source "$1"
|
source "$1"
|
||||||
scan_all_installers
|
scan_all_installers
|
||||||
' bash "$PROJECT_ROOT/bin/installers.sh"
|
' bash "$PROJECT_ROOT/bin/installer.sh"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" == *"installer.zip"* ]]
|
[[ "$output" == *"installer.zip"* ]]
|
||||||
@@ -474,7 +446,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source "$1"
|
source "$1"
|
||||||
scan_all_installers
|
scan_all_installers
|
||||||
' bash "$PROJECT_ROOT/bin/installers.sh"
|
' bash "$PROJECT_ROOT/bin/installer.sh"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" != *"data.zip"* ]]
|
[[ "$output" != *"data.zip"* ]]
|
||||||
@@ -497,7 +469,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source "$1"
|
source "$1"
|
||||||
scan_all_installers
|
scan_all_installers
|
||||||
' bash "$PROJECT_ROOT/bin/installers.sh"
|
' bash "$PROJECT_ROOT/bin/installer.sh"
|
||||||
|
|
||||||
# Should succeed even with missing paths
|
# Should succeed even with missing paths
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
@@ -514,7 +486,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source \"\$1\"
|
source \"\$1\"
|
||||||
scan_installers_in_path \"\$2\"
|
scan_installers_in_path \"\$2\"
|
||||||
" bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/Downloads"
|
" bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/Downloads"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" == *"My App Installer.dmg"* ]]
|
[[ "$output" == *"My App Installer.dmg"* ]]
|
||||||
@@ -527,7 +499,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source \"\$1\"
|
source \"\$1\"
|
||||||
scan_installers_in_path \"\$2\"
|
scan_installers_in_path \"\$2\"
|
||||||
" bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/Downloads"
|
" bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/Downloads"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" == *"App-v1.2.3_beta.pkg"* ]]
|
[[ "$output" == *"App-v1.2.3_beta.pkg"* ]]
|
||||||
@@ -542,7 +514,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source \"\$1\"
|
source \"\$1\"
|
||||||
scan_installers_in_path \"\$2\"
|
scan_installers_in_path \"\$2\"
|
||||||
" bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/Downloads"
|
" bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/Downloads"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ -z "$output" ]]
|
[[ -z "$output" ]]
|
||||||
@@ -562,7 +534,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source "$1"
|
source "$1"
|
||||||
scan_installers_in_path "$2"
|
scan_installers_in_path "$2"
|
||||||
' bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/Downloads"
|
' bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/Downloads"
|
||||||
|
|
||||||
# Should succeed (return 0) and silently skip the corrupt ZIP
|
# Should succeed (return 0) and silently skip the corrupt ZIP
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
@@ -592,7 +564,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source "$1"
|
source "$1"
|
||||||
scan_installers_in_path "$2"
|
scan_installers_in_path "$2"
|
||||||
' bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/Downloads"
|
' bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/Downloads"
|
||||||
|
|
||||||
# Should succeed and find the readable.zip but skip restricted.zip
|
# Should succeed and find the readable.zip but skip restricted.zip
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
@@ -620,7 +592,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source "$1"
|
source "$1"
|
||||||
scan_installers_in_path "$2"
|
scan_installers_in_path "$2"
|
||||||
' bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/Downloads"
|
' bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/Downloads"
|
||||||
|
|
||||||
# Should find the valid ZIP and silently skip the corrupt one
|
# Should find the valid ZIP and silently skip the corrupt one
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
@@ -643,7 +615,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source "$1"
|
source "$1"
|
||||||
scan_installers_in_path "$2"
|
scan_installers_in_path "$2"
|
||||||
' bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/Downloads"
|
' bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/Downloads"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" == *"real.dmg"* ]]
|
[[ "$output" == *"real.dmg"* ]]
|
||||||
@@ -660,7 +632,7 @@ setup() {
|
|||||||
export MOLE_TEST_MODE=1
|
export MOLE_TEST_MODE=1
|
||||||
source \"\$1\"
|
source \"\$1\"
|
||||||
scan_installers_in_path \"\$2\"
|
scan_installers_in_path \"\$2\"
|
||||||
" bash "$PROJECT_ROOT/bin/installers.sh" "$HOME/Downloads"
|
" bash "$PROJECT_ROOT/bin/installer.sh" "$HOME/Downloads"
|
||||||
|
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[[ "$output" == *"real.dmg"* ]]
|
[[ "$output" == *"real.dmg"* ]]
|
||||||
Reference in New Issue
Block a user