You are not logged in.

#1 2008-12-03 00:45:06

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

E17 SVN Builder, a new script for pacman to keep your E17 up to date!

I created a script called E17 SVN Builder because of what it does: create packages of E17 direct from SVN using the same PKGBUILDs as the Arch snapshots do. It came around because I was bitten by the Settings panel bug, which was fixed in upstream a few days after the SVN snapshot was taken. I wanted an up to date E17 install, so I created this script. Do NOT use it if you want your E17 install to be stable(r?)!

I just thought I would share this script since it works for me. Perhaps people could help me improve it? smile

Anyway, the dependancies right now are:
yaourt-git (I need it to fetch the PKGBUILDs for the images from CVS)
svn (to fetch the E17 code)

TODO:
- I need to get rid of the dependancy on yaourt-git by extracting the code for fetching the PKGBUILDs with it.
- I want to be able to use flags with this.

License: GPLv3

Version: 0.2

#!/bin/sh
# *******************************************
# *             E17-svn-builder             *
# * A script to build E17 directly from SVN *
# *            By smartboyathome            *
# *******************************************
VERSION=0.2
usage(){
  echo 'E17 SVN Builder'
  echo 'This is version '$VERSION
  echo 'For now, this is a very simple script. It will fetch and build the PKGBUILDs for you. It is recommend you create a new directory to run this in, as it will pollute a directory with tons of files and folders.'
  echo '-h, --help; Show this message.'
}

while [ "$#" -ne "0" ]; do
  case $1 in
    --help)
    usage
    exit 0
    ;;
    -h)
    usage
    exit 0
    ;;
  esac
done

buildpkg(){
echo 'Building '$_E17PKG'...'
# Check if the package directory exists, and if not, create it.
if [ -d $_E17PKG ]; then
  cd $_E17PKG
else
  mkdir $_E17PKG
  cd $_E17PKG
fi
# Check if the PKGBUILD exists, and if not, get it.
if [ -d PKGBUILD ]; then
  yaourt -G $_E17PKG
else
  mv PKGBUILD PKGBUILD.old
  yaourt -G $_E17PKG
  mv PKGBUILD PKGBUILD.new | mv PKGBUILD.old PKGBUILD
  cmp -s PKGBUILD PKGBUILD.new || mv PKGBUILD.new PKGBUILD
fi
makepkg PKGBUILD
mv *.pkg.tar.gz ../
cd ../
}

# Make sure there aren't any left over environment variables from a previous run or program. This keeps things clean. :)
unset _EXTRA
unset _E17PKG

echo 'Would you like to build the e17-extra-svn packages as well? (y/n)'
read _EXTRA

# Remove all packages
rm *.pkg.tar.gz

echo 'Beginning to build e17-svn packages...'


#--- Begin building eina-svn ---
_E17PKG=eina-svn
buildpkg

#--- Begin building eet-svn ---
_E17PKG=eet-svn
buildpkg

#--- Begin building evas-svn ---
_E17PKG=evas-svn
buildpkg

#--- Begin building ecore-svn ---
_E17PKG=ecore-svn
buildpkg

#--- Begin building embryo-svn ---
_E17PKG=embryo-svn
buildpkg

#--- Begin building edje-svn ---
_E17PKG=edje-svn
buildpkg

#--- Begin building e_dbus-svn ---
_E17PKG=e_dbus-svn
buildpkg

#--- Begin building efreet-svn ---
_E17PKG=efreet-svn
buildpkg

#--- Begin building e-svn ---
_E17PKG=e-svn
buildpkg

echo 'Finished building e17-svn packages!'

if [ $EXTRA="y" ]; then
  echo 'Beginning to build e17-extra-svn packages...'

  #--- Begin building exml-svn ---
  _E17PKG=exml-svn
  buildpkg

  #--- Begin building emprint-svn ---
  _E17PKG=emprint-svn
  buildpkg

  #--- Begin building engrave-svn ---
  _E17PKG=engrave-svn
  buildpkg

  #--- Begin building epsilon-svn ---
  _E17PKG=epsilon-svn
  buildpkg

  #--- Begin building esmart-svn ---
  _E17PKG=esmart-svn
  buildpkg

  #--- Begin building etk-svn ---
  _E17PKG=etk-svn
  buildpkg

  #--- Begin building ewl-svn ---
  _E17PKG=ewl-svn
  buildpkg

  #--- Begin building e-modules-extra-svn ---
  _E17PKG=e-modules-extra-svn
  buildpkg

  #--- Begin building elitaire-svn ---
  _E17PKG=elitaire-svn
  buildpkg

  #--- Begin building entrance-svn ---
  _E17PKG=entrance-svn
  buildpkg

  #--- Begin building exhibit-svn ---
  _E17PKG=exhibit-svn
  buildpkg

  echo 'Finished building e17-extra-svn packages!'
fi

echo ''
echo 'All package building is complete!'
echo 'It is recommended you restart E17 after installing these packages.'
echo 'To do this, go to menu > Enlightenment > Restart;'
echo 'If you cant, then issue this command to restart it:'
echo 'enlightenment_remote -restart'
echo ''
echo 'Have a nice day!'

# Unsetting our variables so that we aren't messing with anything else. Also keeps things clean. :)
unset _E17PKG
unset _EXTRA
exit 0

Last edited by smartboyathome (2008-12-21 21:10:47)

Offline

#2 2008-12-07 23:18:36

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

Re: E17 SVN Builder, a new script for pacman to keep your E17 up to date!

UPDATE! This package has had a couple changes:
- Repetitive stuff was condensed into one piece of code. Now, its much easier to read. smile
- I implemented extra differently. Instead of using a flag (which for some reason always sent me into a loop, I need more practice with scripting tongue), I just ask the person running the script whether they want to build extra as well as the core e17-svn stuff. Now it doesn't build them all automatically.

Offline

#3 2008-12-08 11:30:42

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: E17 SVN Builder, a new script for pacman to keep your E17 up to date!

Cool thing, I think I'll give this a try

Offline

#4 2009-02-16 04:41:51

smartboyathome
Member
From: $HOME
Registered: 2007-12-23
Posts: 334
Website

Re: E17 SVN Builder, a new script for pacman to keep your E17 up to date!

Just to let you guys know, this script is defunct now that theres easy-e17 and Ronald's script (see AUR).

Offline

Board footer

Powered by FluxBB