Jump to content

Ubuntu 14.04 install script


Josh
 Share

Recommended Posts

This is quite a lot cleaner than what we had previously:

#!/bin/bash

packages=(libc6:i386 libgcc1:i386 libgl1-mesa-glx:i386 libglib2.0-0:i386
        libopenal1:i386 libstdc++6:i386 libx11-6:i386 libxxf86vm1:i386
        gtk2-engines:i386 gtk2-engines-murrine:i386 unity-gtk2-module:i386 libdbusmenu-glib4:i386)

pkgcnt=$(dpkg -l "${packages[@]}" | grep ^ii | wc -l)

if [ "$pkgcnt" -ge ${packages[#]} ]; then
  # Everything's installed, so exit quietly
  exit 0
fi

cat <<EOF
Leadwerks requires the following extra packages to function correctly:
${packages[*]}

Do you wish to install them? [Yn]
EOF

while read response; do
  case $response in
      y|Y|"")
          sudo apt-get install ${packages[@]}
          ret=$?

          if [ $ret -eq 0 ]; then
              echo "Successfully installed packages."
              exit 0
          else
              echo "Failed to install packages. Try again? [Yn]"
          fi
          ;;

      n|N)
          echo "Aborting as per user request."
          exit 1
          ;;

      *)
          echo "Please enter y or n."
  esac
done

 

I already updated the server with this file.

  • Upvote 2

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

line 9: #: syntax error: operand expected (error token is "#")

 

 

properly just a paste error from the forums, but how am I supposed to get the new script when the updater refuses to run because it cannot find libX11.so.6 ?huh.png

 

 

edit:

 

as it turns out running the broken script allowed me to run the update wich game me a the new improved version - and that also has the above bug.

System:

Linux Mint 17 ( = Ubuntu 14.04 with cinnamon desktop ) Ubuntu 14.04, AMD HD 6850, i5 2500k

Link to comment
Share on other sites

I thought that was included by default? It works on a fresh install for me.

Fresh install - amd64, only chance was to install chrome.

System:

Linux Mint 17 ( = Ubuntu 14.04 with cinnamon desktop ) Ubuntu 14.04, AMD HD 6850, i5 2500k

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...