Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/dash
- version="libfm.sh version 2015.08.10 Weremouse"
- chlog() {
- echo "libfm ($libfm_version-1) wily; urgency=low"
- cat<<EOF
- * git pull
- fixing #751 lxpanel wakes up external green drives
- http://sourceforge.net/p/lxde/bugs/751/
- Eliminate usage of GVolumeMonitor if no FmFolder object was created
- https://github.com/lxde/libfm/commit/994a1e25ba0c3da80575fc002af17ab02ed5998b
- EOF
- echo " -- Weremouse <silver.bullet@zoho.com> $(date "+%a, %m %b %Y %T %z")"
- echo
- }
- usage() {
- echo $version
- cat<<EOF
- Without root privileges run
- ./libfm.sh
- EOF
- exit
- }
- # start
- if [ "$(id -u)" = "0" ]; then usage; fi
- printf "\033[7m"; date "+%a, %m %b %Y %T %z"; printf "\033[0m"
- mkdir -p libfm.deb
- cd libfm.deb
- # git pull
- if [ ! -d libfm ]; then
- printf "\n\033[7mgit clone \033[0m\n"
- git clone https://github.com/lxde/libfm.git || exit 1
- fi
- printf "\n\033[7mgit pull --all \033[0m\n"
- cd libfm
- git pull --all || exit 1
- libfm_version=$(git describe --always --abbrev=10 | sed "s/-/./g")
- cd ..
- if [ -d libfm-$libfm_version ]; then
- echo "Directory libfm-$libfm_version already exists."; exit 1
- fi
- # update
- printf "\n\033[7mUpdate and simulate dist-upgrade? [y/N] \033[0m "
- read char
- case $char in
- y|Y)
- sudo apt-get update && echo && sudo apt-get dist-upgrade --dry-run
- printf "\n\033[7mContinue without upgrading or exit? [C/e] \033[0m "
- read char
- case $char in
- e|E) exit;;
- esac;;
- esac
- # get distro packages
- printf "\n\033[7mget distro packages \033[0m\n"
- if [ "$(ls -d libfm-1.2.3.*.g??????????)" = "" ]; then
- printf " this isn't an error\n\n"
- gpg --keyserver hkp://pgp.uni-mainz.de --recv-keys 18F5FBCE
- echo
- apt-get source libfm
- mv -i libfm-1.2.3 libfm-$libfm_version || exit 1
- else
- mv -i $(ls -d libfm-1.2.3.*.g??????????) libfm-$libfm_version || exit 1
- fi
- sudo apt-get build-dep libfm || exit 1
- # copy source
- printf "\n\033[7mcopy source from upstream to package source\033[0m\n"
- cd libfm
- tar -cf ../libfm-$libfm_version.tar $(ls -A ../libfm)
- cd ../libfm-$libfm_version
- tar -xf ../libfm-$libfm_version.tar || exit 1
- echo "done"
- # add changelog entry
- printf "\n\033[7mlog changes \033[0m\n"
- libfm_chanlog=$(cat debian/changelog)
- chlog > debian/changelog
- echo "$libfm_chanlog" >> debian/changelog
- echo "done"
- # build packages
- printf "\n\033[7mbuild packages \033[0m\n"
- printf "starting step 1 of 4 steps"
- libtoolize --force --copy --automake
- sleep 1
- printf "\033[26Dstarting step 2 of 4 steps"
- aclocal
- printf "\033[26Dstarting step 3 of 4 steps"
- autoreconf
- printf "\033[26Dstarting step 4 of 4 steps\n"
- debuild -b -us -uc
- # install packages and resolve dependencies
- printf "\n\033[7minstall packages and resolve dependencies \033[0m\n"
- sudo dpkg -i $(ls ../*$libfm_version*deb | grep -v dbg)
- echo
- sudo apt-get install -f
- echo
- printf "\033[7m"; date "+%a, %m %b %Y %T %z"; printf "\033[0m"
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement