Sync all scripts from website downloads — 352 scripts total
Includes updated JS challenge scripts with Claude-User whitelist, same-site referer bypass, Blackbox-Exporter allowed bot, and all new exporters, cheat sheets, and automation scripts.
This commit is contained in:
+6
-3
@@ -7,10 +7,13 @@
|
||||
#### Author: Phil Connor ####
|
||||
#### Contact: contact@mylinux.work ####
|
||||
#### License: MIT ####
|
||||
#### Version: 2.3 ####
|
||||
#### Version: 2.4 ####
|
||||
#### ####
|
||||
#### Usage: sudo ./expand-drive.sh ####
|
||||
#############################################################
|
||||
# v2.4 changes:
|
||||
# - Fixed: grep in pipeline crashes under set -euo pipefail when no matches found. Added || true guard
|
||||
#############################################################
|
||||
|
||||
# Set strict error handling:
|
||||
# -e: Exit immediately if a command exits with a non-zero status
|
||||
@@ -189,7 +192,7 @@ process_partition() {
|
||||
|
||||
# Extract partition number from device path (e.g., extract "1" from "/dev/sda1")
|
||||
local part_num
|
||||
part_num=$(echo "$partition" | grep -o '[0-9]\+$' | tail -1)
|
||||
part_num=$(echo "$partition" | { grep -o '[0-9]\+$' || true; } | tail -1)
|
||||
if [ -z "$part_num" ]; then
|
||||
log_error "Could not extract partition number from $partition"
|
||||
return 1
|
||||
@@ -293,7 +296,7 @@ main() {
|
||||
# Get list of all disk devices in the system using lsblk
|
||||
# Filter for disk type and extract device names
|
||||
local devices
|
||||
devices=$($LSBLK_PATH -pln -o NAME,TYPE | grep "disk" | cut -d' ' -f1)
|
||||
devices=$($LSBLK_PATH -pln -o NAME,TYPE | { grep "disk" || true; } | cut -d' ' -f1)
|
||||
|
||||
# Verify we found at least one disk device
|
||||
if [ -z "$devices" ]; then
|
||||
|
||||
Reference in New Issue
Block a user