Skip to content

Instantly share code, notes, and snippets.

@artem78
Last active September 11, 2023 09:48
Show Gist options
  • Save artem78/d1b326e3f338f32eeae65a41dfbfd0f5 to your computer and use it in GitHub Desktop.
Save artem78/d1b326e3f338f32eeae65a41dfbfd0f5 to your computer and use it in GitHub Desktop.
#!/bin/sh
if [ $(arch) = 'x86_64' ]; then
arch_package_prefix='amd64'
else
arch_package_prefix='i386'
fi
if [ $(dpkg-query -W -f='${Status}' fpc-src 2>/dev/null | grep -c "ok installed") -eq 0 ];
then
wget "https://master.dl.sourceforge.net/project/lazarus/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.2.4/fpc-src_3.2.2-210709_${arch_package_prefix}.deb"
sudo dpkg -i "fpc-src_3.2.2-210709_${arch_package_prefix}.deb"
sudo apt-get install -f
rm "fpc-src_3.2.2-210709_${arch_package_prefix}.deb"
fi
if [ $(dpkg-query -W -f='${Status}' fpc-laz 2>/dev/null | grep -c "ok installed") -eq 0 ];
then
wget "https://master.dl.sourceforge.net/project/lazarus/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.2.4/fpc-laz_3.2.2-210709_${arch_package_prefix}.deb"
sudo dpkg -i "fpc-laz_3.2.2-210709_${arch_package_prefix}.deb"
sudo apt-get install -f
rm "fpc-laz_3.2.2-210709_${arch_package_prefix}.deb"
fi
if [ $(dpkg-query -W -f='${Status}' lazarus-project 2>/dev/null | grep -c "ok installed") -eq 0 ];
then
wget "https://master.dl.sourceforge.net/project/lazarus/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.2.4/lazarus-project_2.2.4-0_${arch_package_prefix}.deb"
sudo dpkg -i "lazarus-project_2.2.4-0_${arch_package_prefix}.deb"
sudo apt-get install -f
rm "lazarus-project_2.2.4-0_${arch_package_prefix}.deb"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment