[pacman-dev] [PATCH 3/5] Clean is done everytime it's asked for

Martti Kühne mysatyre at gmail.com
Sat Aug 13 06:23:28 EDT 2011


On Sat, Aug 13, 2011 at 1:08 AM, Seblu <seblu at seblu.net> wrote:
> On Sat, Aug 13, 2011 at 12:53 AM, Allan McRae <allan at archlinux.org> wrote:
>> Is it really necessary?  "rm -rf pkg/ src/" does the job...
>
> ok
>

I have these functions in my .bashrc. Feel free to use or modify them.

cdp() {
  local relpath="$HOME/abs" subdirs
  if ! [[ "$PWD" == "$relpath"* ]]; then
    echo "Error: this function is made for use in $relpath" >&2
    return 1
  fi
  subdirs="${PWD:${#relpath}+1}"
  cd "$relpath/${subdirs%%/*}"
}

nanop() {
  if cdp; then
    set -- -Ysh "PKGBUILD"
    $(which nano) "$@"
    cd -
  fi
}

clearp() {
  if cdp; then
    . /etc/makepkg.conf
    rm -rf src pkg *"$PKGEXT" *"$SRCEXT"
  fi
}


More information about the pacman-dev mailing list