Postinstall script

I would like to make a postinstall script, to avoid having to add/change a number of things after a fresh install.

First thing is to install a number of packages that are listed in a text file.

pamac upgrade -a
pamac install < packagestoinstall

But this does not work, so how can I make pamac read the packages to install from a text file ?
A few packages come from aur, will they be installed in this way, or do I need to add something to tell pamac to also install from aur ?

After having installed brother-mfc-9970cdw and brscan5 from aur,
I would like to set the IP address for my Brother printer/scanner
via this script.
Any ideas on how to do this ?

Hi @mbbs1024 :wink:

Best way I know would be creating your own custom iso:

https://wiki.manjaro.org/index.php/Build_Manjaro_ISOs_with_buildiso

Benefits:

  1. No need for a postinstall script.
  2. All packages are included, no need to download them.
  3. You can use text files and scripts, which will run there.
  4. The Installer will just copy the content of the squashfs images to the disk. So everything is there as you need on first installation.