aboutsummaryrefslogtreecommitdiff
path: root/build-scripts/create-user-build-script
diff options
context:
space:
mode:
authorAmit Pundir <amit.pundir@linaro.org>2013-05-23 01:44:57 +0530
committerAmit Pundir <amit.pundir@linaro.org>2013-05-23 01:44:57 +0530
commitafdea3d9ef9f77ccca5071daf2d8bf0248255689 (patch)
treeaaee5f7c73a90786e17455486119eaa37e14de71 /build-scripts/create-user-build-script
parent2f339f6d3f90ad636f3e1e51995df4a85d8c7945 (diff)
create-user-build-script: cleanup and few dependency fixes
Diffstat (limited to 'build-scripts/create-user-build-script')
-rwxr-xr-xbuild-scripts/create-user-build-script39
1 files changed, 14 insertions, 25 deletions
diff --git a/build-scripts/create-user-build-script b/build-scripts/create-user-build-script
index 60ec4a9..5beedea 100755
--- a/build-scripts/create-user-build-script
+++ b/build-scripts/create-user-build-script
@@ -71,53 +71,42 @@ else
fi
echo
if [[ \${UBUNTU} =~ "13." || \${UBUNTU} =~ "12.10" ]]; then
- if [ \`dpkg-query -W -f='\${Status}\n' software-properties-common 2>&1 | grep -i 'No packages found matching' | wc -l\` -gt 0 ] ; then
- echo "Installing missing base dependency .."
+ if [ \`dpkg-query -W -f='\${Status}\n' software-properties-common 2>&1 | grep '^install ok' | wc -l\` -eq 0 ]; then
+ echo "Installing missing base dependency: software-properties-common"
sudo apt-get install software-properties-common
fi
sudo dpkg --add-architecture i386
- echo
- echo "Checking missing dependencies if any .. .."
PKGS+=' libstdc++6:i386 git-core'
- MISSING=\`dpkg-query -W -f='\${Status}\n' \${PKGS} 2>&1 | grep -i 'No packages found matching' | cut -d' ' -f6\`
- if [ -n "\$MISSING" ] ; then
- echo -n "Missing required packages: "
- for m in \$MISSING ; do
- echo -n "\${m} "
- done
- fi
elif [[ \${UBUNTU} =~ "12.04" || \${UBUNTU} =~ "10.04" ]] ; then
- if [ \`dpkg-query -W -f='\${Status}\n' python-software-properties 2>&1 | grep -i 'No packages found matching' | wc -l\` -gt 0 ] ; then
- echo "Installing missing base dependency .."
+ if [ \`dpkg-query -W -f='\${Status}\n' python-software-properties 2>&1 | grep '^install ok' | wc -l\` -eq 0 ] ; then
+ echo "Installing missing base dependency: python-software-properties"
sudo apt-get install python-software-properties
fi
- echo "Checking missing dependencies if any .. .."
if [[ \${UBUNTU} =~ "12.04" ]]; then
PKGS+=' libstdc++6:i386 git-core'
else
PKGS+=' ia32-libs libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext'
fi
- MISSING=\`dpkg-query -W -f='\${Status}\n' \${PKGS} 2>&1 | grep -i 'No packages found matching' | cut -d' ' -f5\`
- if [ -n "\$MISSING" ] ; then
- echo -n "Missing required packages: "
- for m in \$MISSING ; do
- echo -n "\${m%?} "
- done
- fi
else
- echo
echo "ERROR: Only Ubuntu 10.04*, 12.* and 13.04 versions are supported."
exit 1
fi
+echo
+echo "Checking missing dependencies if any..."
+MISSING=\`dpkg-query -W -f='\${Status} \${PACKAGE}\n' \${PKGS} 2>&1 | grep -v '^install ok' | awk '{print \$NF}'\`
if [ -n "\$MISSING" ] ; then
+ echo -n "Missing required packages: "
+ for m in \$MISSING ; do
+ echo -n "\${m} "
+ done
echo
- echo "Setting up Ubuntu software repositories .."
+ echo "Setting up Ubuntu software repositories..."
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu \$(lsb_release -sc) main universe restricted multiverse"
sudo apt-get update
echo
- echo "Installing missing dependencies .. .."
- sudo apt-get install \`echo \${MISSING} | sed 's/\.//g'\` gnupg flex bison build-essential libc6-dev g++-multilib
+ echo "Installing missing dependencies..."
+ sudo apt-get install \`echo \${MISSING} | sed 's/\.//g'\`
# Obsolete git version 1.7.04 in lucid official repositories
# repo need at least git v1.7.2
if [[ \${UBUNTU} =~ "10.04" ]]; then