mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
add Archlinux doctor support
This commit is contained in:
parent
4cb1764439
commit
254844b5ec
@ -220,6 +220,8 @@ class SystemUtil
|
|||||||
'redhat',
|
'redhat',
|
||||||
// alpine
|
// alpine
|
||||||
'alpine',
|
'alpine',
|
||||||
|
// arch
|
||||||
|
'arch', 'manjaro',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,8 +40,13 @@ class LinuxToolCheckList
|
|||||||
'xz',
|
'xz',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public const TOOLS_ARCH = [
|
||||||
|
'base-devel', 'cmake',
|
||||||
|
];
|
||||||
|
|
||||||
private const PROVIDED_COMMAND = [
|
private const PROVIDED_COMMAND = [
|
||||||
'binutils-gold' => 'ld.gold',
|
'binutils-gold' => 'ld.gold',
|
||||||
|
'base-devel' => 'automake',
|
||||||
];
|
];
|
||||||
|
|
||||||
/** @noinspection PhpUnused */
|
/** @noinspection PhpUnused */
|
||||||
@ -53,6 +58,7 @@ class LinuxToolCheckList
|
|||||||
$required = match ($distro['dist']) {
|
$required = match ($distro['dist']) {
|
||||||
'alpine' => self::TOOLS_ALPINE,
|
'alpine' => self::TOOLS_ALPINE,
|
||||||
'redhat' => self::TOOLS_RHEL,
|
'redhat' => self::TOOLS_RHEL,
|
||||||
|
'arch' => self::TOOLS_ARCH,
|
||||||
default => self::TOOLS_DEBIAN,
|
default => self::TOOLS_DEBIAN,
|
||||||
};
|
};
|
||||||
$missing = [];
|
$missing = [];
|
||||||
@ -67,6 +73,7 @@ class LinuxToolCheckList
|
|||||||
'alpine',
|
'alpine',
|
||||||
'redhat',
|
'redhat',
|
||||||
'Deepin',
|
'Deepin',
|
||||||
|
'arch',
|
||||||
'debian' => CheckResult::fail(implode(', ', $missing) . ' not installed on your system', 'install-linux-tools', [$distro, $missing]),
|
'debian' => CheckResult::fail(implode(', ', $missing) . ' not installed on your system', 'install-linux-tools', [$distro, $missing]),
|
||||||
default => CheckResult::fail(implode(', ', $missing) . ' not installed on your system'),
|
default => CheckResult::fail(implode(', ', $missing) . ' not installed on your system'),
|
||||||
};
|
};
|
||||||
@ -114,6 +121,7 @@ class LinuxToolCheckList
|
|||||||
'ubuntu', 'debian', 'Deepin' => 'apt-get install -y',
|
'ubuntu', 'debian', 'Deepin' => 'apt-get install -y',
|
||||||
'alpine' => 'apk add',
|
'alpine' => 'apk add',
|
||||||
'redhat' => 'dnf install -y',
|
'redhat' => 'dnf install -y',
|
||||||
|
'arch' => 'pacman -S --noconfirm',
|
||||||
default => throw new RuntimeException('Current linux distro does not have an auto-install script for musl packages yet.'),
|
default => throw new RuntimeException('Current linux distro does not have an auto-install script for musl packages yet.'),
|
||||||
};
|
};
|
||||||
$prefix = '';
|
$prefix = '';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user