From 2d6dcf4ae0cd2309493f32e2fb5600aa1b3bda82 Mon Sep 17 00:00:00 2001 From: Donald Ephraim Curtis Date: Tue, 13 Dec 2011 21:45:54 -0600 Subject: [PATCH] Further updates to directory changing problems. Should be resolved to changing into the melpa directory initially, and then doing all cd commands relative to that directory. --- melpa | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/melpa b/melpa index bb9ad55d..a26cf830 100755 --- a/melpa +++ b/melpa @@ -1,61 +1,56 @@ #!/bin/bash - BASEDIR=`dirname $0` +cd ${BASEDIR} || exit 1 + function melpa_update_epkgs { echo "Updating epkgs..." - cd ${BASEDIR}/epkgs || return 1 + cd epkgs || return 1 git pull - cd - + cd .. echo } function melpa_clear_packages { echo "*** Clearing the packages folder..." - rm ${BASEDIR}/packages/* + rm /packages/* echo } function melpa_build_pkglist { echo "*** Building all packages..." - cd ${BASEDIR} || return 1 for pkg in `cat pkglist`; do echo "Building package: $pkg" ./buildpkg $pkg echo echo done - cd - echo } function melpa_build_archive { echo "Building package: $pkg" - cd ${BASEDIR} || return 1 emacs --batch -l package-build.el -u dcurtis --eval "(package-build-archive \"$1\")" - cd - echo } function melpa_sync { echo "*** Pushing changes to the server..." - cd ${BASEDIR} || return 1 rsync -avz --delete packages webpage/index.html milkbox.net:webapps/melpa/ - cd - echo } function melpa_generate_html { echo "*** Building webpage..." - cd ${BASEDIR}/webpage || return 1 + cd webpage || return 1 awk '{ if(//) while((getline < "../pkglist")>0) print "* " $0 else print}' index.tmpl > index.md pandoc -s --mathml -t html --smart index.md > index.html - cd - + cd .. echo }