Updated bash stub, added more checks to hotfix
This commit is contained in:
parent
b63260533f
commit
10f4f09a34
@ -87,16 +87,25 @@ class Hotfix
|
|||||||
|
|
||||||
public function getName()
|
public function getName()
|
||||||
{
|
{
|
||||||
|
if (!array_key_exists('hotfix', $this->header)) {
|
||||||
|
return "Untitled hotfix";
|
||||||
|
}
|
||||||
return $this->header['hotfix'];
|
return $this->header['hotfix'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getInfo()
|
public function getInfo()
|
||||||
{
|
{
|
||||||
|
if (!array_key_exists('info', $this->header)) {
|
||||||
|
return "No additional information";
|
||||||
|
}
|
||||||
return $this->header['info'];
|
return $this->header['info'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAuthor()
|
public function getAuthor()
|
||||||
{
|
{
|
||||||
|
if (!array_key_exists('author', $this->header)) {
|
||||||
|
return "Unknown author";
|
||||||
|
}
|
||||||
return $this->header['author'];
|
return $this->header['author'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ function exec() {
|
|||||||
EC=$?
|
EC=$?
|
||||||
if [ $EC -gt 0 ]; then
|
if [ $EC -gt 0 ]; then
|
||||||
echo -e "\e[31;1m[warn]\e[31;21m Command completed with exitcode $EC\e[0m"
|
echo -e "\e[31;1m[warn]\e[31;21m Command completed with exitcode $EC\e[0m"
|
||||||
cat $LOG
|
tail -n5 $LOG | awk '{ print " " $0 }'
|
||||||
fi
|
fi
|
||||||
rm $LOG
|
rm $LOG
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user