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 22 Dec 2014, 07:34
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 Posts_count  
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_website 
goingnuts

Joined: 07 Dec 2008
Posts: 784

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_website 
seaside

Joined: 11 Apr 2007
Posts: 888

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:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


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