Further clarify in-development files

Renamed each in-development shell script file so that they are
    very clearly not ready to be run by the end-user.
This commit is contained in:
Lee Ockert
2023-10-18 17:51:38 -04:00
parent c4b6bd13e1
commit c0ab647c91
2 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,40 @@
#!/usr/bin/env bash
function storebackupdrivelist() {
# Search for external drives
local ext_drv_srch=`diskutil list | grep external`
local ext_drv_list=`diskutil list | grep external | sed 's/.*\(disk[0-9][0-9]*\).*/\1/g'`
# Then, for each one...
for drivename in $ext_drv_list; do
# Get the HFS partitions
local ext_hfs_ptns=`diskutil list ${drivename} | grep "Apple_HFS" | grep "${drivename}" | cut -w -f7`
# And get their volume names, mount points, and mount status
for partitionname in $ext_hfs_ptns; do
local volumename=`diskutil info /dev/${partitionname} | grep "Volume Name:" | cut -w -f4`
local mountpoint=`diskutil info /dev/${partitionname} | grep "Mount Point:" | cut -w -f4`
if [ mountpoint == "" ]; then
mountpoint="(none)"
local mountstatus="NO"
else
local mountstatus="YES"
fi
if [ ${#drives[@]} -eq 0 ]; then
drives=("${partitionname}")
else
drives=("${drives[@]}","${partitionname}")
fi
drives=("${drives[@]}","${volumename}")
drives=("${drives[@]}","${mountstatus}")
drives=("${drives[@]}","${mountpoint}")
drives=("${drives[@]}","EOL")
done
done
}
declare -a drives
storebackupdrivelist drives
echo "drives = ${drives}"