Skip to content
Snippets Groups Projects
test_apt.sh 424 B
Newer Older
Karim's avatar
Karim committed
#!/bin/bash
# Check that the installation of an Ubuntu package using APT works.
Karim's avatar
Karim committed

Florent Thiery's avatar
Florent Thiery committed
echo "Testing apt-get install"

echo "Clean repository"
apt-get clean

#Testing if sl package exists and remove it

if ( dpkg -s sl >/dev/null 2>&1 ); then
   echo "Removing already installed testing package"
   apt-get -y remove sl
fi 

# Installation testing package sl
Karim's avatar
Karim committed
apt-get update && apt-get -y install sl && apt-get -y remove sl