mirror of
https://github.com/kevinveenbirkenbach/linux-image-manager.git
synced 2025-11-21 09:46:25 +00:00
Refactoring
This commit is contained in:
19
scripts/image/base.sh
Normal file
19
scripts/image/base.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Offers base functions for the image management
|
||||
#
|
||||
# shellcheck disable=SC2034 #Deactivate checking of unused variables
|
||||
# shellcheck source=/dev/null # Deactivate SC1090
|
||||
source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh failed." && exit 1)
|
||||
|
||||
# Writes the full partition name
|
||||
# @parameter $1 is device path
|
||||
# @parameter $2 is the partition number
|
||||
echo_partition_name(){
|
||||
if [ "${1:5:1}" != "s" ]
|
||||
then
|
||||
echo "$1""p""$2"
|
||||
else
|
||||
echo "$1$2"
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user