summaryrefslogtreecommitdiff
path: root/diff-unfree
diff options
context:
space:
mode:
Diffstat (limited to 'diff-unfree')
-rwxr-xr-xdiff-unfree11
1 files changed, 6 insertions, 5 deletions
diff --git a/diff-unfree b/diff-unfree
index 2cc3ac7..86a537f 100755
--- a/diff-unfree
+++ b/diff-unfree
@@ -27,7 +27,7 @@ custom_config=$XDG_CONFIG_HOME/libretools/libretools.conf
msg "Diff-Unfree helps you diff build scripts from ABSLibre against
(Unfree) ABS. Package name and repo will we guessed if you don't
specify them."
- msg2 "Usage: $0 [unfree-package] [repo]"
+ msg2 "Usage: $0 [repo] [unfree-package]"
exit 0
}
@@ -38,11 +38,10 @@ custom_config=$XDG_CONFIG_HOME/libretools/libretools.conf
package_guess=$(basename $PWD)
-package=${1:-${package_guess/-libre}}
-repo=${2:-$(basename $(dirname $PWD))}
+repo=${1:-$(basename $(dirname $PWD))}
+package=${2:-${package_guess/-libre}}
tmp_dir=$(mktemp -d /tmp/${package}.XXXXXX)
-unfree_dir="${tmp_dir}/packages/${package}/trunk"
svnrepo="packages"
case $repo in
@@ -56,6 +55,8 @@ case $repo in
;;
esac
+unfree_dir="${tmp_dir}/${svnrepo}/${package}/trunk"
+
[[ ! -d "${tmp_dir}" ]] && {
error "Can't create temp dir"
exit 1
@@ -67,7 +68,7 @@ msg "Getting diff from $repo/$package..."
stdnull 'svn checkout --depth=empty svn://svn.archlinux.org/$svnrepo'
-cd packages
+cd ${svnrepo}
svn update ${package}
# Back to start dir