Skip to content

Commit 4b0055e

Browse files
authored
saner
1 parent 8d0416d commit 4b0055e

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Github/Runners/debloat_ubuntu.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ readonly BLUE='\033[0;34m'
1818
readonly NC='\033[0m' # No Color
1919

2020
# Script configuration
21-
readonly SCRIPT_NAME="$(basename "$0")"
21+
SCRIPT_NAME="$(basename "$0")"
22+
readonly SCRIPT_NAME
2223
readonly PROVISIONER_FILE="/opt/runner/provisioner"
2324

2425
# Function to print colored output
@@ -106,7 +107,7 @@ get_disk_stats() {
106107
local root_disk
107108
root_disk="$(df -h / | awk 'NR==2 {print $1}')"
108109

109-
echo "$(df -h "$root_disk" | awk 'NR==2 {print $1":"$2":"$3":"$5}')"
110+
df -h "$root_disk" | awk 'NR==2 {print $1":"$2":"$3":"$5}'
110111
}
111112

112113
# Function to parse disk stats
@@ -230,10 +231,10 @@ perform_cleanup() {
230231
{
231232
local info="${cleanup_jobs[$job]}"
232233
local desc="${info%%:*}"
233-
local paths="${info#*:}"
234+
local path_string="${info#*:}"
234235

235236
log "info" "Removing $desc"
236-
IFS=':' read -ra path_array <<< "$paths"
237+
IFS=':' read -ra path_array <<< "$path_string"
237238
safe_remove "${path_array[@]}"
238239
} &
239240
pids+=($!)

0 commit comments

Comments
 (0)