Skip to content

Commit

Permalink
`Refactor: Remove unnecessary sleep commands and simplify ui_print me…
Browse files Browse the repository at this point in the history
…ssages`
  • Loading branch information
ZG089 committed Dec 22, 2024
1 parent cc420d9 commit 9251f63
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 1 addition & 3 deletions common/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,7 @@ done

# Merge files into a single hosts file
mkdir -p $MODPATH/system/etc
ui_print "- Preparing weapons to kill malware🔫..."
sleep 1
ui_print "- This may take a while, please wait...."
ui_print "- Preparing weapons to kill malware🔫.. (Please wait)"
{
for file in /system/etc/hosts hosts1 hosts2 hosts3 hosts4 hosts5 hosts6 ; do
[ -f "$file" ] && cat "$file"
Expand Down
3 changes: 0 additions & 3 deletions system/bin/rmlwk
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ case "$(tolower "$1")" in
--block-gambling|--block-fakenews)
block_type=${1#--block-}
echo "- Downloading entries for ${block_type}."
sleep 0.5
fetch /data/local/tmp/hosts https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/${block_type}-only/hosts &>/dev/null
echo "- Applying entries..."
cat /data/local/tmp/hosts "$hosts_file" | grep -vE '^[[:space:]]*#' | grep -vE '^[[:space:]]*$' | sort | uniq > "$hosts_file"
Expand All @@ -118,7 +117,6 @@ case "$(tolower "$1")" in
--block-porn)
block_type=${1#--block-}
echo "- Downloading entries for porn block"
sleep 0.5
fetch /data/local/tmp/hosts1 https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/${block_type}-only/hosts &>/dev/null
fetch /data/local/tmp/hosts2 https://raw.githubusercontent.com/johnlouie09/Anti-Porn-HOSTS-File/refs/heads/master/HOSTS.txt &>/dev/null
fetch /data/local/tmp/hosts3 https://www.someonewhocares.org/hosts/hosts &>/dev/null
Expand All @@ -145,7 +143,6 @@ case "$(tolower "$1")" in
;;
--update-hosts)
echo "- Downloading updates, Please wait."
sleep 0.5
fetch /data/local/tmp/hosts1 https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts &>/dev/null
fetch /data/local/tmp/hosts2 https://raw.githubusercontent.com/hagezi/dns-blocklists/main/hosts/pro.plus-compressed.txt &>/dev/null
fetch /data/local/tmp/hosts3 https://o0.pages.dev/Pro/hosts.txt &>/dev/null
Expand Down

0 comments on commit 9251f63

Please sign in to comment.