mirror of
https://github.com/kevinveenbirkenbach/linux-image-manager.git
synced 2025-11-21 09:46:25 +00:00
Refactored function echo_partition_name
This commit is contained in:
@@ -10,11 +10,11 @@ source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh
|
||||
# @parameter $1 is device path
|
||||
# @parameter $2 is the partition number
|
||||
echo_partition_name(){
|
||||
if [ "${1:5:1}" != "s" ]
|
||||
if [ "${device_path:5:1}" != "s" ]
|
||||
then
|
||||
echo "$1""p""$2"
|
||||
echo "$device_path""p""$2"
|
||||
else
|
||||
echo "$1$2"
|
||||
echo "$device_path$2"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user