Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Script to act as a pro-argument
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Gulver
n00b
n00b


Joined: 22 Feb 2014
Posts: 5

PostPosted: Thu Feb 27, 2014 6:41 am    Post subject: Script to act as a pro-argument Reply with quote

I'd use PRIME for load consuming applications in a two GPU machine.

For it to work, I have to run the app with "DRI_PRIME=1."
Code:
DRI_PRIME=1 /usr/bin/app


What I want is to make a binary script to input the argument to use as:
Code:
script app


Alternative suggestions are welcome.
Back to top
View user's profile Send private message
i92guboj
Moderator
Moderator


Joined: 30 Nov 2004
Posts: 10089
Location: Córdoba (Spain)

PostPosted: Thu Feb 27, 2014 8:39 am    Post subject: Reply with quote

Something in the lines of

Code:

#!/bin/bash
export foo="moo"
eval "$@"


Note that 'eval' is a bash built-in, so if you use another shell you'll need some other syntax.
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
Gulver
n00b
n00b


Joined: 22 Feb 2014
Posts: 5

PostPosted: Thu Feb 27, 2014 9:22 am    Post subject: Reply with quote

Thanks. 8)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
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