mirror of
https://github.com/linuxserver/docker-mods.git
synced 2026-03-23 00:05:28 +08:00
32 lines
992 B
Plaintext
Executable File
32 lines
992 B
Plaintext
Executable File
#!/usr/bin/with-contenv bash
|
|
|
|
source /etc/lsb-release
|
|
|
|
if [ -f "/powershell/powershell.tar.gz" ]; then
|
|
echo "Installing PowerShell"
|
|
if [ "${DISTRIB_CODENAME}" == "bionic" ]; then
|
|
echo "\
|
|
libicu60 \
|
|
libunwind8" >> /mod-repo-packages-to-install.list
|
|
elif [ "${DISTRIB_CODENAME}" == "focal" ]; then
|
|
echo "\
|
|
libicu66 \
|
|
libunwind8" >> /mod-repo-packages-to-install.list
|
|
elif [ "${DISTRIB_CODENAME}" == "jammy" ]; then
|
|
echo "\
|
|
libicu70 \
|
|
libunwind8" >> /mod-repo-packages-to-install.list
|
|
elif [ "${DISTRIB_CODENAME}" == "noble" ]; then
|
|
echo "\
|
|
libicu74 \
|
|
libunwind8" >> /mod-repo-packages-to-install.list
|
|
fi
|
|
tar xf "/powershell/powershell.tar.gz" -C /powershell
|
|
rm -rf \
|
|
/powershell/powershell.tar.gz
|
|
ln -s /powershell/pwsh /usr/bin/pwsh
|
|
chmod +x /powershell/pwsh
|
|
else
|
|
echo "PowerShell already installed, skipping"
|
|
fi
|