summaryrefslogtreecommitdiff
path: root/homebrew/cdargs
diff options
context:
space:
mode:
Diffstat (limited to 'homebrew/cdargs')
-rw-r--r--homebrew/cdargs/.beer53
-rw-r--r--homebrew/cdargs/.make.sh-auto7
-rw-r--r--homebrew/cdargs/_metadata/description1
-rw-r--r--homebrew/cdargs/_metadata/homepage1
-rw-r--r--homebrew/cdargs/_metadata/name1
-rw-r--r--homebrew/cdargs/_metadata/version1
-rwxr-xr-xhomebrew/cdargs/download.sh1
-rwxr-xr-xhomebrew/cdargs/patches.sh29
8 files changed, 94 insertions, 0 deletions
diff --git a/homebrew/cdargs/.beer b/homebrew/cdargs/.beer
new file mode 100644
index 000000000..43bfc5fec
--- /dev/null
+++ b/homebrew/cdargs/.beer
@@ -0,0 +1,53 @@
+{
+ "name": "Cdargs",
+ "description": "Bookmarks for the shell",
+ "url": "https://www.skamphausen.de/downloads/cdargs/cdargs-1.35.tar.gz",
+ "mirror": null,
+ "homepage": "https://www.skamphausen.de/cgi-bin/ska/CDargs",
+ "depends": [],
+ "resource": [],
+ "conflicts": [],
+ "patches": [
+ {
+ "url": null,
+ "data": [
+ "diff --git a/contrib/cdargs-bash.sh b/contrib/cdargs-bash.sh\n",
+ "index 8a197ef..f3da067 100644\n",
+ "--- a/contrib/cdargs-bash.sh\n",
+ "+++ b/contrib/cdargs-bash.sh\n",
+ "@@ -11,6 +11,12 @@\n",
+ " CDARGS_SORT=0 # set to 1 if you want mark to sort the list\n",
+ " CDARGS_NODUPS=1 # set to 1 if you want mark to delete dups\n",
+ " \n",
+ "+# Support ZSH via its BASH completion emulation\n",
+ "+if [ -n \"$ZSH_VERSION\" ]; then\n",
+ "+\tautoload bashcompinit\n",
+ "+\tbashcompinit\n",
+ "+fi\n",
+ "+\n",
+ " # --------------------------------------------- #\n",
+ " # Run the cdargs program to get the target #\n",
+ " # directory to be used in the various context #\n",
+ "@@ -166,7 +172,7 @@ function mark ()\n",
+ " local tmpfile\n",
+ " \n",
+ " # first clear any bookmarks with this same alias, if file exists\n",
+ "- if [[ \"$CDARGS_NODUPS\" && -e \"$HOME/.cdargs\" ]]; then\n",
+ "+ if [ \"$CDARGS_NODUPS\" ] && [ -e \"$HOME/.cdargs\" ]; then\n",
+ " tmpfile=`echo ${TEMP:-${TMPDIR:-/tmp}} | sed -e \"s/\\\\/$//\"`\n",
+ " tmpfile=$tmpfile/cdargs.$USER.$$.$RANDOM\n",
+ " grep -v \"^$1 \" \"$HOME/.cdargs\" > $tmpfile && 'mv' -f $tmpfile \"$HOME/.cdargs\";\n"
+ ]
+ }
+ ],
+ "install": [
+ "system \"./configure\", \"--prefix=#{prefix}\", \"--mandir=#{man}\"",
+ "system \"make\"",
+ "system \"make\", \"install-strip\"",
+ "rm Dir[\"contrib/Makefile*\"]",
+ "prefix.install \"contrib\"",
+ "bash_completion.install_symlink \"#{prefix}/contrib/cdargs-bash.sh\""
+ ],
+ "version": "1.35",
+ "file": "cdargs.rb"
+} \ No newline at end of file
diff --git a/homebrew/cdargs/.make.sh-auto b/homebrew/cdargs/.make.sh-auto
new file mode 100644
index 000000000..24d65b85a
--- /dev/null
+++ b/homebrew/cdargs/.make.sh-auto
@@ -0,0 +1,7 @@
+pkg:setup
+pkg:configure
+make
+make DESTDIR=${PKG_DEST} install-strip
+rm Dir["contrib/Makefile*"]
+prefix.install "contrib"
+bash_completion.install_symlink "#{prefix}/contrib/cdargs-bash.sh"
diff --git a/homebrew/cdargs/_metadata/description b/homebrew/cdargs/_metadata/description
new file mode 100644
index 000000000..586261aa0
--- /dev/null
+++ b/homebrew/cdargs/_metadata/description
@@ -0,0 +1 @@
+Bookmarks for the shell
diff --git a/homebrew/cdargs/_metadata/homepage b/homebrew/cdargs/_metadata/homepage
new file mode 100644
index 000000000..e16766ff2
--- /dev/null
+++ b/homebrew/cdargs/_metadata/homepage
@@ -0,0 +1 @@
+https://www.skamphausen.de/cgi-bin/ska/CDargs
diff --git a/homebrew/cdargs/_metadata/name b/homebrew/cdargs/_metadata/name
new file mode 100644
index 000000000..42497679a
--- /dev/null
+++ b/homebrew/cdargs/_metadata/name
@@ -0,0 +1 @@
+Cdargs
diff --git a/homebrew/cdargs/_metadata/version b/homebrew/cdargs/_metadata/version
new file mode 100644
index 000000000..f7613c2d4
--- /dev/null
+++ b/homebrew/cdargs/_metadata/version
@@ -0,0 +1 @@
+1.35
diff --git a/homebrew/cdargs/download.sh b/homebrew/cdargs/download.sh
new file mode 100755
index 000000000..c32221823
--- /dev/null
+++ b/homebrew/cdargs/download.sh
@@ -0,0 +1 @@
+wget https://www.skamphausen.de/downloads/cdargs/cdargs-1.35.tar.gz \ No newline at end of file
diff --git a/homebrew/cdargs/patches.sh b/homebrew/cdargs/patches.sh
new file mode 100755
index 000000000..3ccfc055f
--- /dev/null
+++ b/homebrew/cdargs/patches.sh
@@ -0,0 +1,29 @@
+echo 'Creating brew-patch.diff'
+cat << EOF >> brew-patch.diff
+diff --git a/contrib/cdargs-bash.sh b/contrib/cdargs-bash.sh
+index 8a197ef..f3da067 100644
+--- a/contrib/cdargs-bash.sh
++++ b/contrib/cdargs-bash.sh
+@@ -11,6 +11,12 @@
+ CDARGS_SORT=0 # set to 1 if you want mark to sort the list
+ CDARGS_NODUPS=1 # set to 1 if you want mark to delete dups
+
++# Support ZSH via its BASH completion emulation
++if [ -n "$ZSH_VERSION" ]; then
++ autoload bashcompinit
++ bashcompinit
++fi
++
+ # --------------------------------------------- #
+ # Run the cdargs program to get the target #
+ # directory to be used in the various context #
+@@ -166,7 +172,7 @@ function mark ()
+ local tmpfile
+
+ # first clear any bookmarks with this same alias, if file exists
+- if [[ "$CDARGS_NODUPS" && -e "$HOME/.cdargs" ]]; then
++ if [ "$CDARGS_NODUPS" ] && [ -e "$HOME/.cdargs" ]; then
+ tmpfile=`echo ${TEMP:-${TMPDIR:-/tmp}} | sed -e "s/\\/$//"`
+ tmpfile=$tmpfile/cdargs.$USER.$$.$RANDOM
+ grep -v "^$1 " "$HOME/.cdargs" > $tmpfile && 'mv' -f $tmpfile "$HOME/.cdargs";
+EOF