<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.playonlinux.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Thewafflication</id>
		<title>PlayOnLinux - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.playonlinux.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Thewafflication"/>
		<link rel="alternate" type="text/html" href="https://wiki.playonlinux.com/index.php/Special:Contributions/Thewafflication"/>
		<updated>2026-04-17T11:14:44Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://wiki.playonlinux.com/index.php?title=Scripting_-_Chapter_1:_Getting_to_know_Bash&amp;diff=885</id>
		<title>Scripting - Chapter 1: Getting to know Bash</title>
		<link rel="alternate" type="text/html" href="https://wiki.playonlinux.com/index.php?title=Scripting_-_Chapter_1:_Getting_to_know_Bash&amp;diff=885"/>
				<updated>2017-10-18T20:55:17Z</updated>
		
		<summary type="html">&lt;p&gt;Thewafflication: /* Requirements of every script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
You would like to create your own scripts for PlayOnLinux but you don&amp;#039;t know squat about programming? This tutorial will explain the basics and you&amp;#039;ll soon be a pro in &amp;#039;&amp;#039;playonlinuxian&amp;#039;&amp;#039; Bash.&lt;br /&gt;
&lt;br /&gt;
== Bash? ==&lt;br /&gt;
&lt;br /&gt;
Bash is a command interpretor (or &amp;quot;shell&amp;quot;) in &amp;#039;&amp;#039;&amp;#039;GNU/Linux&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Mac OS X&amp;#039;&amp;#039;&amp;#039;. It&amp;#039;s the one appearing when you launch a terminal. It also allows you to make &amp;#039;&amp;#039;&amp;#039;scripts&amp;#039;&amp;#039;&amp;#039;. A &amp;#039;&amp;#039;&amp;#039;script&amp;#039;&amp;#039;&amp;#039; is a list of commands that your shell will execute one after the other.&lt;br /&gt;
PlayOnLinux has advanced functions in Bash to make the scripting process easier. Let&amp;#039;s get acquainted with them.&lt;br /&gt;
&lt;br /&gt;
== Requirements of every script ==&lt;br /&gt;
&lt;br /&gt;
Every PlayOnLinux script must contain this boilerplate code:&lt;br /&gt;
# --[[User:Thewafflication|Thewafflication]] ([[User talk:Thewafflication|talk]]) 22:55, 18 October 2017 (CEST) Needs update&lt;br /&gt;
&amp;lt;pre class=&amp;quot;code playonlinux&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/env playonlinux-bash       &lt;br /&gt;
[ &amp;quot;$PLAYONLINUX&amp;quot; = &amp;quot;&amp;quot; ] &amp;amp;&amp;amp; exit 0&lt;br /&gt;
source &amp;quot;$PLAYONLINUX/lib/sources&amp;quot;&lt;br /&gt;
&lt;br /&gt;
POL_SetupWindow_Init&lt;br /&gt;
&lt;br /&gt;
POL_SetupWindow_Close&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Warning|Do not copy the line numbers to the script. It is also highly recommended that you type it out by hand while learning, as opposed to copying and pasting, so as to become more familiar with the scripting language.}}&lt;br /&gt;
&lt;br /&gt;
The above code may not make sense to you yet. We will explain what it does as we go.&lt;br /&gt;
&lt;br /&gt;
During this tutorial, I will not repeat this code over and over in the examples, as you will need it in every script. Remember to always include it, otherwise your script won&amp;#039;t work.&lt;br /&gt;
&lt;br /&gt;
== Executing your script ==&lt;br /&gt;
&lt;br /&gt;
Ask your favourite text editor to save your script, then use the function &amp;#039;&amp;#039;&amp;#039;Run a local script&amp;#039;&amp;#039;&amp;#039; from the &amp;#039;&amp;#039;&amp;#039;Tools&amp;#039;&amp;#039;&amp;#039; menu of PlayOnLinux.&lt;br /&gt;
&lt;br /&gt;
== Script signing ==&lt;br /&gt;
&lt;br /&gt;
PlayOnLinux uses digital signing (authentication) on scripts to certify that scripts have been validated by PlayOnLinux scripters. All the scripts available from the &amp;#039;&amp;#039;&amp;#039;Install&amp;#039;&amp;#039;&amp;#039; window of PlayOnLinux are validated.&lt;br /&gt;
Each time you will try to run a script that has not been validated by PlayOnLinux scripters, you will get a warning message telling you that the script has no valid signature (see screenshot below).&lt;br /&gt;
&lt;br /&gt;
{{POL_SetupWindow_message|Run a local script|Warning!!&lt;br /&gt;
&lt;br /&gt;
The signature of the script you are trying to run is NOT valid.&lt;br /&gt;
&lt;br /&gt;
PlayOnLinux has not approved this script and will not be responsible for it. Please ensure you know what you are doing!&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
You must click on &amp;#039;&amp;#039;&amp;#039;Next&amp;#039;&amp;#039;&amp;#039; button to get PlayOnLinux to show you the script source, then click on the &amp;#039;&amp;#039;&amp;#039;I Agree&amp;#039;&amp;#039;&amp;#039; checkbox, before you can (finally) run the script (see screenshot below).&lt;br /&gt;
&lt;br /&gt;
{{POL_SetupWindow_licence|Run a local script|Here is the source code of the script. Check it carefully:&lt;br /&gt;
|&amp;lt;pre&amp;gt;#!/usr/bin/env playonlinux-bash&lt;br /&gt;
[ &amp;quot;$PLAYONLINUX&amp;quot; = &amp;quot;&amp;quot; ] &amp;amp;&amp;amp; exit 0&lt;br /&gt;
source &amp;quot;$PLAYONLINUX/lib/sources&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
POL_SetupWindow_Init&lt;br /&gt;
 &lt;br /&gt;
POL_SetupWindow_Close&lt;br /&gt;
exit&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Info|A real time saver for experienced script developers: If you&amp;#039;re familiar with the command line interface, you may have guessed from the first line of the script above that PlayOnLinux scripts can also be run using the playonlinux-bash command.&lt;br /&gt;
Written as above, you can even set the executable bit on PlayOnLinux install scripts! }}&lt;br /&gt;
&lt;br /&gt;
* [[Scripting - Chapter 2: Basic Functions|Chapter 2: Basic Functions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Thewafflication</name></author>	</entry>

	<entry>
		<id>https://wiki.playonlinux.com/index.php?title=Scripting_-_Chapter_1:_Getting_to_know_Bash&amp;diff=884</id>
		<title>Scripting - Chapter 1: Getting to know Bash</title>
		<link rel="alternate" type="text/html" href="https://wiki.playonlinux.com/index.php?title=Scripting_-_Chapter_1:_Getting_to_know_Bash&amp;diff=884"/>
				<updated>2017-10-18T20:54:54Z</updated>
		
		<summary type="html">&lt;p&gt;Thewafflication: /* Requirements of every script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
You would like to create your own scripts for PlayOnLinux but you don&amp;#039;t know squat about programming? This tutorial will explain the basics and you&amp;#039;ll soon be a pro in &amp;#039;&amp;#039;playonlinuxian&amp;#039;&amp;#039; Bash.&lt;br /&gt;
&lt;br /&gt;
== Bash? ==&lt;br /&gt;
&lt;br /&gt;
Bash is a command interpretor (or &amp;quot;shell&amp;quot;) in &amp;#039;&amp;#039;&amp;#039;GNU/Linux&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Mac OS X&amp;#039;&amp;#039;&amp;#039;. It&amp;#039;s the one appearing when you launch a terminal. It also allows you to make &amp;#039;&amp;#039;&amp;#039;scripts&amp;#039;&amp;#039;&amp;#039;. A &amp;#039;&amp;#039;&amp;#039;script&amp;#039;&amp;#039;&amp;#039; is a list of commands that your shell will execute one after the other.&lt;br /&gt;
PlayOnLinux has advanced functions in Bash to make the scripting process easier. Let&amp;#039;s get acquainted with them.&lt;br /&gt;
&lt;br /&gt;
== Requirements of every script ==&lt;br /&gt;
&lt;br /&gt;
Every PlayOnLinux script must contain this boilerplate code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;code playonlinux&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/env playonlinux-bash       # --~~~~ Needs update&lt;br /&gt;
[ &amp;quot;$PLAYONLINUX&amp;quot; = &amp;quot;&amp;quot; ] &amp;amp;&amp;amp; exit 0&lt;br /&gt;
source &amp;quot;$PLAYONLINUX/lib/sources&amp;quot;&lt;br /&gt;
&lt;br /&gt;
POL_SetupWindow_Init&lt;br /&gt;
&lt;br /&gt;
POL_SetupWindow_Close&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Warning|Do not copy the line numbers to the script. It is also highly recommended that you type it out by hand while learning, as opposed to copying and pasting, so as to become more familiar with the scripting language.}}&lt;br /&gt;
&lt;br /&gt;
The above code may not make sense to you yet. We will explain what it does as we go.&lt;br /&gt;
&lt;br /&gt;
During this tutorial, I will not repeat this code over and over in the examples, as you will need it in every script. Remember to always include it, otherwise your script won&amp;#039;t work.&lt;br /&gt;
&lt;br /&gt;
== Executing your script ==&lt;br /&gt;
&lt;br /&gt;
Ask your favourite text editor to save your script, then use the function &amp;#039;&amp;#039;&amp;#039;Run a local script&amp;#039;&amp;#039;&amp;#039; from the &amp;#039;&amp;#039;&amp;#039;Tools&amp;#039;&amp;#039;&amp;#039; menu of PlayOnLinux.&lt;br /&gt;
&lt;br /&gt;
== Script signing ==&lt;br /&gt;
&lt;br /&gt;
PlayOnLinux uses digital signing (authentication) on scripts to certify that scripts have been validated by PlayOnLinux scripters. All the scripts available from the &amp;#039;&amp;#039;&amp;#039;Install&amp;#039;&amp;#039;&amp;#039; window of PlayOnLinux are validated.&lt;br /&gt;
Each time you will try to run a script that has not been validated by PlayOnLinux scripters, you will get a warning message telling you that the script has no valid signature (see screenshot below).&lt;br /&gt;
&lt;br /&gt;
{{POL_SetupWindow_message|Run a local script|Warning!!&lt;br /&gt;
&lt;br /&gt;
The signature of the script you are trying to run is NOT valid.&lt;br /&gt;
&lt;br /&gt;
PlayOnLinux has not approved this script and will not be responsible for it. Please ensure you know what you are doing!&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
You must click on &amp;#039;&amp;#039;&amp;#039;Next&amp;#039;&amp;#039;&amp;#039; button to get PlayOnLinux to show you the script source, then click on the &amp;#039;&amp;#039;&amp;#039;I Agree&amp;#039;&amp;#039;&amp;#039; checkbox, before you can (finally) run the script (see screenshot below).&lt;br /&gt;
&lt;br /&gt;
{{POL_SetupWindow_licence|Run a local script|Here is the source code of the script. Check it carefully:&lt;br /&gt;
|&amp;lt;pre&amp;gt;#!/usr/bin/env playonlinux-bash&lt;br /&gt;
[ &amp;quot;$PLAYONLINUX&amp;quot; = &amp;quot;&amp;quot; ] &amp;amp;&amp;amp; exit 0&lt;br /&gt;
source &amp;quot;$PLAYONLINUX/lib/sources&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
POL_SetupWindow_Init&lt;br /&gt;
 &lt;br /&gt;
POL_SetupWindow_Close&lt;br /&gt;
exit&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Info|A real time saver for experienced script developers: If you&amp;#039;re familiar with the command line interface, you may have guessed from the first line of the script above that PlayOnLinux scripts can also be run using the playonlinux-bash command.&lt;br /&gt;
Written as above, you can even set the executable bit on PlayOnLinux install scripts! }}&lt;br /&gt;
&lt;br /&gt;
* [[Scripting - Chapter 2: Basic Functions|Chapter 2: Basic Functions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Thewafflication</name></author>	</entry>

	<entry>
		<id>https://wiki.playonlinux.com/index.php?title=Scripting_-_Chapter_1:_Getting_to_know_Bash&amp;diff=883</id>
		<title>Scripting - Chapter 1: Getting to know Bash</title>
		<link rel="alternate" type="text/html" href="https://wiki.playonlinux.com/index.php?title=Scripting_-_Chapter_1:_Getting_to_know_Bash&amp;diff=883"/>
				<updated>2017-10-18T20:54:31Z</updated>
		
		<summary type="html">&lt;p&gt;Thewafflication: /* Requirements of every script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
You would like to create your own scripts for PlayOnLinux but you don&amp;#039;t know squat about programming? This tutorial will explain the basics and you&amp;#039;ll soon be a pro in &amp;#039;&amp;#039;playonlinuxian&amp;#039;&amp;#039; Bash.&lt;br /&gt;
&lt;br /&gt;
== Bash? ==&lt;br /&gt;
&lt;br /&gt;
Bash is a command interpretor (or &amp;quot;shell&amp;quot;) in &amp;#039;&amp;#039;&amp;#039;GNU/Linux&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Mac OS X&amp;#039;&amp;#039;&amp;#039;. It&amp;#039;s the one appearing when you launch a terminal. It also allows you to make &amp;#039;&amp;#039;&amp;#039;scripts&amp;#039;&amp;#039;&amp;#039;. A &amp;#039;&amp;#039;&amp;#039;script&amp;#039;&amp;#039;&amp;#039; is a list of commands that your shell will execute one after the other.&lt;br /&gt;
PlayOnLinux has advanced functions in Bash to make the scripting process easier. Let&amp;#039;s get acquainted with them.&lt;br /&gt;
&lt;br /&gt;
== Requirements of every script ==&lt;br /&gt;
&lt;br /&gt;
Every PlayOnLinux script must contain this boilerplate code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;code playonlinux&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/env playonlinux-bash       #--~~~~ Needs update&lt;br /&gt;
[ &amp;quot;$PLAYONLINUX&amp;quot; = &amp;quot;&amp;quot; ] &amp;amp;&amp;amp; exit 0&lt;br /&gt;
source &amp;quot;$PLAYONLINUX/lib/sources&amp;quot;&lt;br /&gt;
&lt;br /&gt;
POL_SetupWindow_Init&lt;br /&gt;
&lt;br /&gt;
POL_SetupWindow_Close&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Warning|Do not copy the line numbers to the script. It is also highly recommended that you type it out by hand while learning, as opposed to copying and pasting, so as to become more familiar with the scripting language.}}&lt;br /&gt;
&lt;br /&gt;
The above code may not make sense to you yet. We will explain what it does as we go.&lt;br /&gt;
&lt;br /&gt;
During this tutorial, I will not repeat this code over and over in the examples, as you will need it in every script. Remember to always include it, otherwise your script won&amp;#039;t work.&lt;br /&gt;
&lt;br /&gt;
== Executing your script ==&lt;br /&gt;
&lt;br /&gt;
Ask your favourite text editor to save your script, then use the function &amp;#039;&amp;#039;&amp;#039;Run a local script&amp;#039;&amp;#039;&amp;#039; from the &amp;#039;&amp;#039;&amp;#039;Tools&amp;#039;&amp;#039;&amp;#039; menu of PlayOnLinux.&lt;br /&gt;
&lt;br /&gt;
== Script signing ==&lt;br /&gt;
&lt;br /&gt;
PlayOnLinux uses digital signing (authentication) on scripts to certify that scripts have been validated by PlayOnLinux scripters. All the scripts available from the &amp;#039;&amp;#039;&amp;#039;Install&amp;#039;&amp;#039;&amp;#039; window of PlayOnLinux are validated.&lt;br /&gt;
Each time you will try to run a script that has not been validated by PlayOnLinux scripters, you will get a warning message telling you that the script has no valid signature (see screenshot below).&lt;br /&gt;
&lt;br /&gt;
{{POL_SetupWindow_message|Run a local script|Warning!!&lt;br /&gt;
&lt;br /&gt;
The signature of the script you are trying to run is NOT valid.&lt;br /&gt;
&lt;br /&gt;
PlayOnLinux has not approved this script and will not be responsible for it. Please ensure you know what you are doing!&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
You must click on &amp;#039;&amp;#039;&amp;#039;Next&amp;#039;&amp;#039;&amp;#039; button to get PlayOnLinux to show you the script source, then click on the &amp;#039;&amp;#039;&amp;#039;I Agree&amp;#039;&amp;#039;&amp;#039; checkbox, before you can (finally) run the script (see screenshot below).&lt;br /&gt;
&lt;br /&gt;
{{POL_SetupWindow_licence|Run a local script|Here is the source code of the script. Check it carefully:&lt;br /&gt;
|&amp;lt;pre&amp;gt;#!/usr/bin/env playonlinux-bash&lt;br /&gt;
[ &amp;quot;$PLAYONLINUX&amp;quot; = &amp;quot;&amp;quot; ] &amp;amp;&amp;amp; exit 0&lt;br /&gt;
source &amp;quot;$PLAYONLINUX/lib/sources&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
POL_SetupWindow_Init&lt;br /&gt;
 &lt;br /&gt;
POL_SetupWindow_Close&lt;br /&gt;
exit&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Info|A real time saver for experienced script developers: If you&amp;#039;re familiar with the command line interface, you may have guessed from the first line of the script above that PlayOnLinux scripts can also be run using the playonlinux-bash command.&lt;br /&gt;
Written as above, you can even set the executable bit on PlayOnLinux install scripts! }}&lt;br /&gt;
&lt;br /&gt;
* [[Scripting - Chapter 2: Basic Functions|Chapter 2: Basic Functions]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Thewafflication</name></author>	</entry>

	</feed>