Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 20 Oct 2014, 00:37
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
how to make bashscript a clickable one?
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
enhu


Joined: 26 May 2009
Posts: 301

PostPosted: Fri 03 Dec 2010, 05:19    Post subject:  how to make bashscript a clickable one?  

is there a way?
i actually remember there is a way in puppy i just can't find it while searching. can you please lead me to the link.
Back to top
View user's profile Send private message Visit poster's website 
goingnuts

Joined: 07 Dec 2008
Posts: 781

PostPosted: Fri 03 Dec 2010, 07:38    Post subject:  

Think this works:
Code:

[ "$DISPLAY" ] && [ "$(tty | grep not)" ]  && exec rxvt -e sh -c $0
Back to top
View user's profile Send private message Visit poster's website 
seaside

Joined: 11 Apr 2007
Posts: 887

PostPosted: Fri 03 Dec 2010, 10:45    Post subject:  

Perhaps this ......
Code:

#!/bin/bash
# clickable script

#figure out which line the script starts at
LINE=$(awk '/^START OF SCRIPT$/ { print NR + 1 }' $0)
# copy everything starting from $LINE to /tmp/myscript.sh
tail -n+$LINE $0 > /tmp/myscript.sh

# Run /tmp/myscript.sh
exec xterm -e bash /tmp/myscript.sh

START OF SCRIPT

--- your code  here ----


Cheers,
s
Back to top
View user's profile Send private message 
DaveS


Joined: 09 Oct 2008
Posts: 3726
Location: UK

PostPosted: Fri 03 Dec 2010, 11:54    Post subject: Re: how to make bashscript a clickable one?  

enhu wrote:
is there a way?
i actually remember there is a way in puppy i just can't find it while searching. can you please lead me to the link.


Right click on the file. From the pop-up, select 'properties' and in that dialogue, check the 'exec' boxes in the permissions section.

_________________
Spup Frugal HD and USB
Root forever!
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0426s ][ Queries: 11 (0.0042s) ][ GZIP on ]