-
-
Notifications
You must be signed in to change notification settings - Fork 88
Another distro compatibility #64
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,8 @@ set -E | |
version="4.2.0" | ||
scriptName=$(basename "$0") | ||
bashVersion=$(echo "$BASH_VERSION" | cut -d. -f1) | ||
# Requres for any other distribution, like blackPanther OS | ||
DISTRO=$(lsb_release -si | awk '{print $1}'| tr [:upper:] [:lower:]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a guarantee There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lots of applications and scripts depends on lsb_release command for compatibility issues. So that shouldn't be a problem. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I bet you're right. However, since one day this tool might be used on MacOS, I'd rather you replace this shell command with
|
||
|
||
if [ -z "$BASH_VERSION" ] || [ "$bashVersion" -lt 4 ]; then | ||
echo >&2 "You need bash v4+ to run this script. Aborting..." | ||
|
@@ -1323,7 +1325,11 @@ function asrt_checkSyslinuxInstall() { | |
"Your distribution doesn't ship 'extlinux' with the 'syslinux' package." \ | ||
"Please install 'extlinux' and try again." | ||
fi | ||
st_foundSyslinuxBiosFolder=$(find "$ct_syslinuxLibRoot" -type d -path '*/bios' -print -quit) | ||
if [ "$DISTRO" = "blackpanther" ];then | ||
st_foundSyslinuxBiosFolder=$(find "$ct_syslinuxLibRoot" -print -quit) | ||
else | ||
st_foundSyslinuxBiosFolder=$(find "$ct_syslinuxLibRoot" -type d -path '*/bios' -print -quit) | ||
fi | ||
st_foundSyslinuxMbrBinary=$(fs_findFileFromPatterns "$ct_syslinuxLibRoot" 'bios/mbr.bin' 'mbr.bin') | ||
if [ -z "$st_foundSyslinuxBiosFolder" ]; then | ||
ps_failAndExit MISSING_DEPENDENCY \ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woud rather have a name in camelCase, such as
systemDistro