Put the shell script in the location of your choice. You may want it readily available in /home/[your username]/bin or possibly in /usr/local/bin for all users.
I also recommend removing the ".sh" extention so you won't have to use "alfred.sh" in all of the commands. All the code and examples below assume you don't have the ".sh" extension.
Once there, you need to make it executable by running the following command:
chmod +x alfred
alfred [option] <source> <destination> [search_text]
This script compiles a directory of .less files and outputs a directory of .css files. You can search text within the file (optional 'search_text' parameter to filter which less files to compile.
-h, --help Print help
alfred ~/theme/less ~/theme/css
This is the most basic version. It takes all of the less files and compiles them as css.
alfred ~/theme/less ~/theme/css '.theme()'
This takes all of the less files with the text '.theme()' in them and compiles them to css.
Less compiler needs to be installed. See https://lesscss.org for more information.
Andrew Keym @optimus_keym https://github.com/keymholio
Copyright © 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.