Skip to content

Instantly share code, notes, and snippets.

@ssokolow
Created March 9, 2013 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssokolow/5125631 to your computer and use it in GitHub Desktop.
Save ssokolow/5125631 to your computer and use it in GitHub Desktop.
Patches to make pnd_assoc work with paths containing spaces
--- pnd_assoc.old 2012-07-22 06:36:14.000000000 -0400
+++ pnd_assoc 2012-07-22 06:48:24.000000000 -0400
@@ -113,7 +113,7 @@
#}
#at that point, we have everything we need, lets run that pnd
-/usr/pandora/scripts/pnd_run.sh -p "$pndfilepath" -e "$execscript" -b "$workdir" -a "$openfile"
+/usr/pandora/scripts/pnd_run.sh -p "$pndfilepath" -e "$execscript" -b "$workdir" -a "$openfile" -A
#were done here, kill the indicator, in case it took less than 10sec
sleep 0.5
--- pnd_run.sh.old 2012-07-22 07:32:15.000000000 -0400
+++ pnd_run.sh 2012-07-22 06:48:38.000000000 -0400
@@ -540,11 +540,18 @@
export REAL_HOME="$HOME"
export HOME="$UNION_MOUNT_DIR/$PND_NAME"
-
- if echo "$EXENAME"|grep -q ^\.\/;then
- "$EXENAME" $ARGUMENTS
+ if [ $ONE_ARGUMENT ]; then
+ if echo "$EXENAME"|grep -q ^\.\/;then
+ "$EXENAME" "$ARGUMENTS"
+ else
+ "./$EXENAME" "$ARGUMENTS"
+ fi
else
- "./$EXENAME" $ARGUMENTS
+ if echo "$EXENAME"|grep -q ^\.\/;then
+ "$EXENAME" $ARGUMENTS
+ else
+ "./$EXENAME" $ARGUMENTS
+ fi
fi
RC=$?
@@ -645,6 +652,7 @@
shift 2
else # there's no $2 or it's an argument
case "$1" in
+ -A) ONE_ARGUMENT=1;;
-m) ACTION=mount;;
-u) ACTION=umount;;
-x) CLOSE_X=1;;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment