|
Pieters bash scripts
Documentation for the bash scripts I have published
|
This script can be used to automatically run a command as soon as a file is updated/saved. More...
Go to the source code of this file.
Variables | |
| if(func_num_args() -le 0) if(func_num_args() -le 1) | $file = "$1" |
| Name of the file to use as trigger. | |
| $command = "$1" | |
| The command to execute on file modifications. | |
| $arguments = "" | |
| Arguments to pass to the command. | |
| for (arg in "$@";) | |
| $prevlastmod = 0 | |
| Last modified date when we previously ran the command. | |
This script can be used to automatically run a command as soon as a file is updated/saved.
Author: Pieter van der Star (info@.nosp@m.piet.nosp@m.ervan.nosp@m.ders.nosp@m.tar.n.nosp@m.l) Modifications by: (unmodified)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Definition in file run_on_save.sh.
| $arguments = "" |
Arguments to pass to the command.
Definition at line 55 of file run_on_save.sh.
| $command = "$1" |
The command to execute on file modifications.
Definition at line 50 of file run_on_save.sh.
| if(func_num_args() -le 0) if (func_num_args() -le 1) $file = "$1" |
Name of the file to use as trigger.
Definition at line 46 of file run_on_save.sh.
| $prevlastmod = 0 |
Last modified date when we previously ran the command.
Definition at line 62 of file run_on_save.sh.
| for(arg in "$@";) | ( | arg in "$@"; | ) |
Definition at line 56 of file run_on_save.sh.