Bug 171140 - xombrero wrapper script acts wrong
Summary: xombrero wrapper script acts wrong
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Niclas Zeising
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-28 15:00 UTC by kaltheat
Modified: 2012-08-29 11:00 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kaltheat 2012-08-28 15:00:05 UTC
When starting xombrero using the wrapper script located at /usr/local/bin/xombrero the configuration-file gets overwritten each time with a default one.

Fix: 

Wrapper script is a bourne shell script.

There are several callings of "test" to check if several files exist in the user's home directory with pathes in quotes like "~/.xombrero.conf". In my environment the ~ doesn't expand to my home dir when in quotes. When using the test-call without quotes, script works as it should.
How-To-Repeat: execute xombrero using the wrapper script
Comment 1 Niclas Zeising freebsd_committer freebsd_triage 2012-08-29 10:01:53 UTC
Responsible Changed
From-To: freebsd-ports-bugs->zeising

Grab, it's my port.
Comment 2 dfilter service freebsd_committer freebsd_triage 2012-08-29 10:54:12 UTC
Author: zeising
Date: Wed Aug 29 09:53:58 2012
New Revision: 303327
URL: http://svn.freebsd.org/changeset/ports/303327

Log:
  Fix the startup script to not overwrite configuration files and accept
  program arguments
  
  PR:		ports/171140, ports/171141
  Submitted by:	kaltheat <kaltheat@gmail.com> (pr), me (patch)
  Approved by:	miwi (mentor)

Modified:
  head/www/xombrero/files/xombrero.in

Modified: head/www/xombrero/files/xombrero.in
==============================================================================
--- head/www/xombrero/files/xombrero.in	Wed Aug 29 09:44:53 2012	(r303326)
+++ head/www/xombrero/files/xombrero.in	Wed Aug 29 09:53:58 2012	(r303327)
@@ -5,18 +5,18 @@
 # A wrapper script for xombrero
 # Created by HU Dong <itechbear@gmail.com>
 
-if [ ! -d "~/.xombrero" ]; then
-	mkdir -p -m 700 ~/.xombrero
+if [ ! -d "$HOME/.xombrero" ]; then
+	mkdir -p -m 700 $HOME/.xombrero
 fi
 
-if [ ! -f "~/.xombrero.conf" ]; then
-	cp %%EXAMPLESDIR%%/xombrero.conf ~/.xombrero.conf
-	chmod +w ~/.xombrero.conf
+if [ ! -f "$HOME/.xombrero.conf" ]; then
+	cp %%EXAMPLESDIR%%/xombrero.conf $HOME/.xombrero.conf
+	chmod +w $HOME/.xombrero.conf
 fi
 
-if [ ! -f "~/.xombrero/playflash.sh" ]; then
-	cp %%EXAMPLESDIR%%/playflash.sh ~/.xombrero/playflash.sh
-	chmod +x ~/.xombrero/playflash.sh
+if [ ! -f "$HOME/.xombrero/playflash.sh" ]; then
+	cp %%EXAMPLESDIR%%/playflash.sh $HOME/.xombrero/playflash.sh
+	chmod +x $HOME/.xombrero/playflash.sh
 fi
 
-exec %%PREFIX%%/bin/xombrero-bin
+exec %%PREFIX%%/bin/xombrero-bin $@
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Niclas Zeising freebsd_committer freebsd_triage 2012-08-29 10:58:43 UTC
State Changed
From-To: open->closed

Fixed, thanks for the report.