diff options
Diffstat (limited to 'aur')
-rwxr-xr-x | aur | 36 |
1 files changed, 28 insertions, 8 deletions
@@ -42,28 +42,48 @@ for _pkg in ${@}; do _pkg="${_pkg%%[<>=]*}" if [ -f "${_pkg}/PKGBUILD" ]; then - warning "${_pkg} already existed. skipping..." - continue + warning "${_pkg} already existed." + +# Check if we want to diff + if [ -z "${DIFFTOOL}" ]; then + continue + else +# Store our copy of the PKGBUILD dir + _diff="${PWD}/${_pkg}" + stdnull "pushd $(mktemp -d /tmp/${_pkg}.XXXX)" + msg2 "Downloading PKGBUILD into ${PWD} for diff" + fi fi msg "Downloading $_pkg..." - wget -O - -q http://aur.archlinux.org/packages/$_pkg/$_pkg.tar.gz | \ + wget -O - -q https://aur.archlinux.org/packages/$_pkg/$_pkg.tar.gz | \ tar xzf - >/dev/null 2>&1 - [[ $? -ne 0 ]] && { + if [ $? -ne 0 ]; then error "Couldn't get $_pkg" continue - } + fi stdnull "pushd $_pkg" + if [ ! -z "$_diff" ]; then + msg2 "Diffing files" +# Diff all files with our difftool + for file in *; do + ${DIFFTOOL} ${_diff}/${file} ${file} + done + +# Go back to our copy to continue working + stdnull "pushd ${_diff}" + fi + source PKGBUILD - pkgbuild-check-nonfree || { + if ! pkgbuild-check-nonfree; then if [ $? -eq 15 ]; then warning "This PKGBUILD links to known unfree packages" fi - } + fi msg2 "Checking license..." free=0 @@ -84,7 +104,7 @@ for _pkg in ${@}; do if ! is_built $_dep; then if ! find ${ABSROOT} -maxdepth 2 -type d -name "$_dep" | egrep "*" >/dev/null ; then msg2 "$_dep will be get from AUR" - missing_deps+=($_dep) + missing_deps+=($_dep) fi else msg2 "$_dep is on repos" |