forked from neopragma/provision-python-dev-ubuntu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathverify
executable file
·36 lines (31 loc) · 1.17 KB
/
verify
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
#===============================================================================
# See if this instance appears to have everything installed as expected.
# This is for provision-python-dev-training-vm.
#
# Version: 1.0.0
# Date: 28 Oct 2015
# Author: Dave Nicolette
#===============================================================================
echo
echo '============================================================='
echo 'Verifying configuration of Python development environment...'
declare -i errors=0
declare -a pkg
pkg[${#pkg[@]}]='git'
pkg[${#pkg[@]}]='build-essential'
pkg[${#pkg[@]}]="linux-headers-$(uname -r)"
pkg[${#pkg[@]}]='dkms'
pkg[${#pkg[@]}]='python-software-properties'
pkg[${#pkg[@]}]='sublime-text-installer'
pkg[${#pkg[@]}]='python-pip'
for name in "${pkg[@]}"
do
if [[ -n "$(aptitude search ${name})" ]]; then
echo "package ${name} is installed"
else
echo "package ${name} was expected but is not installed - ERROR"
errors="${errors}+1"
fi
done
test "${errors}" -eq 0 && echo "...configuration is as expected." || echo "...${errors} expected package(s) or application(s) not found! Configuration may not function as desired."