penguins-eggs 9.4.5 → 9.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.oclif.manifest.json +1 -1
- package/README.md +10 -10
- package/addons/README.md +1 -1
- package/dist/classes/tailor.js +278 -246
- package/dist/commands/wardrobe/get.js +3 -1
- package/dist/commands/wardrobe/list.js +34 -11
- package/dist/commands/wardrobe/show.js +13 -1
- package/dist/commands/wardrobe/wear.js +2 -11
- package/manpages/doc/man/eggs.html +1 -1
- package/mkinitcpio/manjaro/README.md +1 -1
- package/package.json +8 -8
package/.oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"9.4.5","commands":{"adapt":{"id":"adapt","description":"adapt monitor resolution for VM only","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs adapt"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[]},"analyze":{"id":"analyze","description":"analyze for syncto","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs analyze"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"calamares":{"id":"calamares","description":"configure calamares or install or configure it","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs calamares","sudo eggs calamares --install","sudo eggs calamares --install --theme=/path/to/theme","sudo eggs calamares --remove"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"install":{"name":"install","type":"boolean","char":"i","description":"install calamares and its dependencies","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"release":{"name":"release","type":"boolean","char":"r","description":"release: remove calamares and all its dependencies after the installation","allowNo":false},"remove":{"name":"remove","type":"boolean","description":"remove calamares and its dependencies","allowNo":false},"theme":{"name":"theme","type":"option","description":"theme/branding for eggs and calamares","multiple":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[]},"config":{"id":"config","description":"Configure and install prerequisites deb packages to run it","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs config","sudo eggs config --clean","sudo eggs config --clean --nointeractive"],"flags":{"clean":{"name":"clean","type":"boolean","char":"c","description":"remove old configuration before to create new one","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"cuckoo":{"id":"cuckoo","description":"PXE start with proxy-dhcp","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs cuckoo"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"dad":{"id":"dad","description":"ask help from daddy - TUI configuration helper","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo dad","sudo dad --clean","sudo dad --default"],"flags":{"clean":{"name":"clean","type":"boolean","char":"c","description":"remove old configuration before to create","allowNo":false},"default":{"name":"default","type":"boolean","char":"d","description":"remove old configuration and force default","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[]},"install":{"id":"install","description":"krill: the CLI system installer - the egg became a penguin!","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs install","sudo eggs install --unattended --halt","sudo eggs install --custom it"],"flags":{"crypted":{"name":"crypted","type":"boolean","char":"k","description":"Crypted CLI installation","allowNo":false},"custom":{"name":"custom","type":"option","char":"c","description":"custom unattended configuration","multiple":false},"domain":{"name":"domain","type":"option","char":"d","description":"Domain name, defult: .local","multiple":false},"halt":{"name":"halt","type":"boolean","char":"H","description":"Halt the system after installation","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"ip":{"name":"ip","type":"boolean","char":"i","description":"hostname as ip, eg: ip-192-168-1-33","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"none":{"name":"none","type":"boolean","char":"N","description":"Swap none: 256M","allowNo":false},"pve":{"name":"pve","type":"boolean","char":"p","description":"Proxmox VE install","allowNo":false},"random":{"name":"random","type":"boolean","char":"r","description":"Add random to hostname, eg: colibri-ay412dt","allowNo":false},"small":{"name":"small","type":"boolean","char":"s","description":"Swap small: RAM","allowNo":false},"suspend":{"name":"suspend","type":"boolean","char":"S","description":"Swap suspend: RAM x 2","allowNo":false},"unattended":{"name":"unattended","type":"boolean","char":"u","description":"Unattended installation","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose","allowNo":false}},"args":[]},"kill":{"id":"kill","description":"kill the eggs/free the nest","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs kill"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"mom":{"id":"mom","description":"ask help from mommy - TUI helper","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs mom"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"produce":{"id":"produce","description":"produce a live image from your system whithout your data","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs produce","sudo eggs produce --standard","sudo eggs produce --max","sudo eggs produce --max --basename=colibri","sudo eggs produce --cryptedclone","sudo eggs produce --clone","sudo eggs produce --basename=colibri","sudo eggs produce --basename=colibri --theme /path/to/theme --addons adapt"],"flags":{"addons":{"name":"addons","type":"option","description":"addons to be used: adapt, ichoice, pve, rsupport","multiple":true},"basename":{"name":"basename","type":"option","description":"basename","multiple":false},"clone":{"name":"clone","type":"boolean","char":"c","description":"clone","allowNo":false},"cryptedclone":{"name":"cryptedclone","type":"boolean","char":"C","description":"crypted clone","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"max":{"name":"max","type":"boolean","char":"m","description":"max compression","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"prefix":{"name":"prefix","type":"option","char":"p","description":"prefix","multiple":false},"release":{"name":"release","type":"boolean","description":"release: max compression, remove penguins-eggs and calamares after installation","allowNo":false},"script":{"name":"script","type":"boolean","char":"s","description":"script mode. Generate scripts to manage iso build","allowNo":false},"standard":{"name":"standard","type":"boolean","char":"f","description":"standard compression","allowNo":false},"theme":{"name":"theme","type":"option","description":"theme for livecd, calamares branding and partitions","multiple":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false},"yolk":{"name":"yolk","type":"boolean","char":"y","description":"-y force yolk renew","allowNo":false}},"args":[]},"status":{"id":"status","description":"informations about eggs status","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs status"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[]},"syncfrom":{"id":"syncfrom","description":"restore users and user data from a LUKS volumes","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs syncfrom","sudo eggs syncfrom --file /path/to/fileLUKS"],"flags":{"delete":{"name":"delete","type":"option","description":"rsync --delete delete extraneous files from dest dirs","multiple":false},"file":{"name":"file","type":"option","char":"f","description":"file LUKS volume encrypted","multiple":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"rootdir":{"name":"rootdir","type":"option","char":"r","description":"rootdir of the installed system, when used from live","multiple":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"syncto":{"id":"syncto","description":"saves users and user data in a LUKS volume inside the iso","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs syncto","sudo eggs syncto --file /path/to/fileLUKS"],"flags":{"delete":{"name":"delete","type":"option","description":"rsync --delete delete extraneous files from dest dirs","multiple":false},"file":{"name":"file","type":"option","char":"f","description":"file LUKS volume encrypted","multiple":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"update":{"id":"update","description":"update the Penguins' eggs tool","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs update"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"export:deb":{"id":"export:deb","description":"export deb/docs/iso to the destination host","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs export deb","eggs export deb --clean","eggs export deb --all"],"flags":{"all":{"name":"all","type":"boolean","char":"a","description":"export all archs","allowNo":false},"clean":{"name":"clean","type":"boolean","char":"c","description":"remove old .deb before to copy","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"export:iso":{"id":"export:iso","description":"export iso in the destination host","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs export iso","eggs export iso --clean"],"flags":{"clean":{"name":"clean","type":"boolean","char":"c","description":"delete old ISOs before to copy","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"tools:clean":{"id":"tools:clean","description":"clean system log, apt, etc","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs tools clean"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"tools:ppa":{"id":"tools:ppa","description":"add/remove PPA repositories (Debian family)","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs tools ppa --add","sudo eggs tools ppa --remove"],"flags":{"add":{"name":"add","type":"boolean","char":"a","description":"add penguins-eggs PPA repository","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"remove":{"name":"remove","type":"boolean","char":"r","description":"remove penguins-eggs PPA repository","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"tools:skel":{"id":"tools:skel","description":"update skel from home configuration","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs tools skel","sudo eggs tools skel --user user-to-be-copied"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"user":{"name":"user","type":"option","char":"u","description":"user to be used","multiple":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[]},"tools:stat":{"id":"tools:stat","description":"get statistics from sourceforge","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs tools stat","eggs tools stat --month","eggs tools stat --year"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"month":{"name":"month","type":"boolean","char":"m","description":"current month","allowNo":false},"year":{"name":"year","type":"boolean","char":"y","description":"current year","allowNo":false}},"args":[]},"tools:yolk":{"id":"tools:yolk","description":"configure eggs to install without internet","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs tools yolk"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[],"dir":"/var/local/yolk"},"wardrobe:get":{"id":"wardrobe:get","description":"get warorobe","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs wardrobe get","eggs wardrobe get your-wardrobe"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[{"name":"repo","description":"repository to get","required":false}]},"wardrobe:list":{"id":"wardrobe:list","description":"list costumes and accessoires in wardrobe","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs wardrobe list","eggs wardrobe list your-wardrove"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[{"name":"wardrobe","description":"wardrobe","required":false}]},"wardrobe:show":{"id":"wardrobe:show","description":"show costumes/accessories in wardrobe","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs wardrobe show colibri","eggs wardrobe show accessories/firmwares","eggs wardrobe show accessories/"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"json":{"name":"json","type":"boolean","char":"j","description":"output JSON","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false},"wardrobe":{"name":"wardrobe","type":"option","char":"w","description":"wardrobe","multiple":false}},"args":[{"name":"costume","description":"costume","required":false}],"example":["eggs wardrobe show colibri","eggs wardrobe show accessories/firmwares","eggs wardrobe show accessories/"]},"wardrobe:wear":{"id":"wardrobe:wear","description":"wear costume/accessories from wardrobe","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs wardrobe wear duck","sudo eggs wardrobe wear accessories/firmwares","sudo eggs wardrobe wear wagtail/waydroid"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"no_accessories":{"name":"no_accessories","type":"boolean","char":"a","description":"not install accessories","allowNo":false},"no_firmwares":{"name":"no_firmwares","type":"boolean","char":"f","description":"not install firmwares","allowNo":false},"silent":{"name":"silent","type":"boolean","char":"s","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false},"wardrobe":{"name":"wardrobe","type":"option","char":"w","description":"wardrobe","multiple":false}},"args":[{"name":"costume","description":"costume","required":false}]}}}
|
|
1
|
+
{"version":"9.4.6","commands":{"adapt":{"id":"adapt","description":"adapt monitor resolution for VM only","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs adapt"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[]},"analyze":{"id":"analyze","description":"analyze for syncto","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs analyze"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"calamares":{"id":"calamares","description":"configure calamares or install or configure it","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs calamares","sudo eggs calamares --install","sudo eggs calamares --install --theme=/path/to/theme","sudo eggs calamares --remove"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"install":{"name":"install","type":"boolean","char":"i","description":"install calamares and its dependencies","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"release":{"name":"release","type":"boolean","char":"r","description":"release: remove calamares and all its dependencies after the installation","allowNo":false},"remove":{"name":"remove","type":"boolean","description":"remove calamares and its dependencies","allowNo":false},"theme":{"name":"theme","type":"option","description":"theme/branding for eggs and calamares","multiple":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[]},"config":{"id":"config","description":"Configure and install prerequisites deb packages to run it","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs config","sudo eggs config --clean","sudo eggs config --clean --nointeractive"],"flags":{"clean":{"name":"clean","type":"boolean","char":"c","description":"remove old configuration before to create new one","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"cuckoo":{"id":"cuckoo","description":"PXE start with proxy-dhcp","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs cuckoo"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"dad":{"id":"dad","description":"ask help from daddy - TUI configuration helper","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo dad","sudo dad --clean","sudo dad --default"],"flags":{"clean":{"name":"clean","type":"boolean","char":"c","description":"remove old configuration before to create","allowNo":false},"default":{"name":"default","type":"boolean","char":"d","description":"remove old configuration and force default","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[]},"install":{"id":"install","description":"krill: the CLI system installer - the egg became a penguin!","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs install","sudo eggs install --unattended --halt","sudo eggs install --custom it"],"flags":{"crypted":{"name":"crypted","type":"boolean","char":"k","description":"Crypted CLI installation","allowNo":false},"custom":{"name":"custom","type":"option","char":"c","description":"custom unattended configuration","multiple":false},"domain":{"name":"domain","type":"option","char":"d","description":"Domain name, defult: .local","multiple":false},"halt":{"name":"halt","type":"boolean","char":"H","description":"Halt the system after installation","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"ip":{"name":"ip","type":"boolean","char":"i","description":"hostname as ip, eg: ip-192-168-1-33","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"none":{"name":"none","type":"boolean","char":"N","description":"Swap none: 256M","allowNo":false},"pve":{"name":"pve","type":"boolean","char":"p","description":"Proxmox VE install","allowNo":false},"random":{"name":"random","type":"boolean","char":"r","description":"Add random to hostname, eg: colibri-ay412dt","allowNo":false},"small":{"name":"small","type":"boolean","char":"s","description":"Swap small: RAM","allowNo":false},"suspend":{"name":"suspend","type":"boolean","char":"S","description":"Swap suspend: RAM x 2","allowNo":false},"unattended":{"name":"unattended","type":"boolean","char":"u","description":"Unattended installation","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"Verbose","allowNo":false}},"args":[]},"kill":{"id":"kill","description":"kill the eggs/free the nest","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs kill"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"mom":{"id":"mom","description":"ask help from mommy - TUI helper","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs mom"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"produce":{"id":"produce","description":"produce a live image from your system whithout your data","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs produce","sudo eggs produce --standard","sudo eggs produce --max","sudo eggs produce --max --basename=colibri","sudo eggs produce --cryptedclone","sudo eggs produce --clone","sudo eggs produce --basename=colibri","sudo eggs produce --basename=colibri --theme /path/to/theme --addons adapt"],"flags":{"addons":{"name":"addons","type":"option","description":"addons to be used: adapt, ichoice, pve, rsupport","multiple":true},"basename":{"name":"basename","type":"option","description":"basename","multiple":false},"clone":{"name":"clone","type":"boolean","char":"c","description":"clone","allowNo":false},"cryptedclone":{"name":"cryptedclone","type":"boolean","char":"C","description":"crypted clone","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"max":{"name":"max","type":"boolean","char":"m","description":"max compression","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"prefix":{"name":"prefix","type":"option","char":"p","description":"prefix","multiple":false},"release":{"name":"release","type":"boolean","description":"release: max compression, remove penguins-eggs and calamares after installation","allowNo":false},"script":{"name":"script","type":"boolean","char":"s","description":"script mode. Generate scripts to manage iso build","allowNo":false},"standard":{"name":"standard","type":"boolean","char":"f","description":"standard compression","allowNo":false},"theme":{"name":"theme","type":"option","description":"theme for livecd, calamares branding and partitions","multiple":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false},"yolk":{"name":"yolk","type":"boolean","char":"y","description":"-y force yolk renew","allowNo":false}},"args":[]},"status":{"id":"status","description":"informations about eggs status","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs status"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[]},"syncfrom":{"id":"syncfrom","description":"restore users and user data from a LUKS volumes","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs syncfrom","sudo eggs syncfrom --file /path/to/fileLUKS"],"flags":{"delete":{"name":"delete","type":"option","description":"rsync --delete delete extraneous files from dest dirs","multiple":false},"file":{"name":"file","type":"option","char":"f","description":"file LUKS volume encrypted","multiple":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"rootdir":{"name":"rootdir","type":"option","char":"r","description":"rootdir of the installed system, when used from live","multiple":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"syncto":{"id":"syncto","description":"saves users and user data in a LUKS volume inside the iso","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs syncto","sudo eggs syncto --file /path/to/fileLUKS"],"flags":{"delete":{"name":"delete","type":"option","description":"rsync --delete delete extraneous files from dest dirs","multiple":false},"file":{"name":"file","type":"option","char":"f","description":"file LUKS volume encrypted","multiple":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"update":{"id":"update","description":"update the Penguins' eggs tool","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs update"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"export:deb":{"id":"export:deb","description":"export deb/docs/iso to the destination host","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs export deb","eggs export deb --clean","eggs export deb --all"],"flags":{"all":{"name":"all","type":"boolean","char":"a","description":"export all archs","allowNo":false},"clean":{"name":"clean","type":"boolean","char":"c","description":"remove old .deb before to copy","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"export:iso":{"id":"export:iso","description":"export iso in the destination host","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs export iso","eggs export iso --clean"],"flags":{"clean":{"name":"clean","type":"boolean","char":"c","description":"delete old ISOs before to copy","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"tools:clean":{"id":"tools:clean","description":"clean system log, apt, etc","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs tools clean"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"tools:ppa":{"id":"tools:ppa","description":"add/remove PPA repositories (Debian family)","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs tools ppa --add","sudo eggs tools ppa --remove"],"flags":{"add":{"name":"add","type":"boolean","char":"a","description":"add penguins-eggs PPA repository","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"nointeractive":{"name":"nointeractive","type":"boolean","char":"n","description":"no user interaction","allowNo":false},"remove":{"name":"remove","type":"boolean","char":"r","description":"remove penguins-eggs PPA repository","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","description":"verbose","allowNo":false}},"args":[]},"tools:skel":{"id":"tools:skel","description":"update skel from home configuration","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs tools skel","sudo eggs tools skel --user user-to-be-copied"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"user":{"name":"user","type":"option","char":"u","description":"user to be used","multiple":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[]},"tools:stat":{"id":"tools:stat","description":"get statistics from sourceforge","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs tools stat","eggs tools stat --month","eggs tools stat --year"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"month":{"name":"month","type":"boolean","char":"m","description":"current month","allowNo":false},"year":{"name":"year","type":"boolean","char":"y","description":"current year","allowNo":false}},"args":[]},"tools:yolk":{"id":"tools:yolk","description":"configure eggs to install without internet","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs tools yolk"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[],"dir":"/var/local/yolk"},"wardrobe:get":{"id":"wardrobe:get","description":"get warorobe","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs wardrobe get","eggs wardrobe get your-wardrobe"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[{"name":"repo","description":"repository to get","required":false}]},"wardrobe:list":{"id":"wardrobe:list","description":"list costumes and accessoires in wardrobe","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs wardrobe list","eggs wardrobe list your-wardrobe","eggs wardrobe list --distro arch"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"distro":{"name":"distro","type":"option","char":"d","description":"distro","multiple":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false}},"args":[{"name":"wardrobe","description":"wardrobe","required":false}]},"wardrobe:show":{"id":"wardrobe:show","description":"show costumes/accessories in wardrobe","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["eggs wardrobe show colibri","eggs wardrobe show accessories/firmwares","eggs wardrobe show accessories/"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"json":{"name":"json","type":"boolean","char":"j","description":"output JSON","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false},"wardrobe":{"name":"wardrobe","type":"option","char":"w","description":"wardrobe","multiple":false}},"args":[{"name":"costume","description":"costume","required":false}],"example":["eggs wardrobe show colibri","eggs wardrobe show accessories/firmwares","eggs wardrobe show accessories/"]},"wardrobe:wear":{"id":"wardrobe:wear","description":"wear costume/accessories from wardrobe","strict":true,"pluginName":"penguins-eggs","pluginAlias":"penguins-eggs","pluginType":"core","aliases":[],"examples":["sudo eggs wardrobe wear duck","sudo eggs wardrobe wear accessories/firmwares","sudo eggs wardrobe wear wagtail/waydroid"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"no_accessories":{"name":"no_accessories","type":"boolean","char":"a","description":"not install accessories","allowNo":false},"no_firmwares":{"name":"no_firmwares","type":"boolean","char":"f","description":"not install firmwares","allowNo":false},"verbose":{"name":"verbose","type":"boolean","char":"v","allowNo":false},"wardrobe":{"name":"wardrobe","type":"option","char":"w","description":"wardrobe","multiple":false}},"args":[{"name":"costume","description":"costume","required":false}]}}}
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ penguins-eggs
|
|
|
6
6
|
### Penguins' eggs are generated and new birds are ready to fly...
|
|
7
7
|
[](https://github.com/pieroproietti/penguins-eggs)
|
|
8
8
|
[](https://penguins-eggs.net)
|
|
9
|
-
[](https://penguins-eggs.net/
|
|
9
|
+
[](https://penguins-eggs.net/docs/Tutorial/users-guide)
|
|
10
10
|
[](https://npmjs.org/package/penguins-eggs)
|
|
11
11
|
[](https://sourceforge.net/projects/penguins-eggs/files/DEBS)
|
|
12
12
|
[](https://sourceforge.net/projects/penguins-eggs/files/PKGBUILD)
|
|
@@ -21,7 +21,7 @@ penguins-eggs
|
|
|
21
21
|
* [Packages](#packages)
|
|
22
22
|
* [Usage](#usage)
|
|
23
23
|
* [Commands](#commands)
|
|
24
|
-
* [Penguins' eggs official
|
|
24
|
+
* [Penguins' eggs official guide](#penguins-eggs-official-book)
|
|
25
25
|
* [That's all Folks!](#thats-all-folks)
|
|
26
26
|
<!-- tocstop -->
|
|
27
27
|
|
|
@@ -177,7 +177,7 @@ Once the package has been installed, you can have the new ```eggs``` command. Ty
|
|
|
177
177
|
|
|
178
178
|
At the moment eggs uses the default fast compression, which provides a faster compression speed, for the final compression it is worth using the ```--max``` flag to get more compressed ISOs.
|
|
179
179
|
|
|
180
|
-
In addition to the description of the commands in this README, you can consult the [Penguins' eggs official
|
|
180
|
+
In addition to the description of the commands in this README, you can consult the [Penguins' eggs official guide](#penguins-eggs-official-book).
|
|
181
181
|
|
|
182
182
|
# Commands
|
|
183
183
|
<!-- commands -->
|
|
@@ -714,9 +714,9 @@ DESCRIPTION
|
|
|
714
714
|
update skel from home configuration
|
|
715
715
|
|
|
716
716
|
EXAMPLES
|
|
717
|
-
sudo eggs skel
|
|
717
|
+
sudo eggs tools skel
|
|
718
718
|
|
|
719
|
-
sudo eggs skel --user user-to-be-copied
|
|
719
|
+
sudo eggs tools skel --user user-to-be-copied
|
|
720
720
|
```
|
|
721
721
|
|
|
722
722
|
## `eggs tools stat`
|
|
@@ -759,7 +759,7 @@ DESCRIPTION
|
|
|
759
759
|
configure eggs to install without internet
|
|
760
760
|
|
|
761
761
|
EXAMPLES
|
|
762
|
-
sudo eggs yolk
|
|
762
|
+
sudo eggs tools yolk
|
|
763
763
|
```
|
|
764
764
|
|
|
765
765
|
## `eggs update`
|
|
@@ -848,7 +848,7 @@ DESCRIPTION
|
|
|
848
848
|
EXAMPLES
|
|
849
849
|
$ eggs wardrobe list
|
|
850
850
|
|
|
851
|
-
$ eggs wardrobe list your-
|
|
851
|
+
$ eggs wardrobe list your-wardrobe
|
|
852
852
|
```
|
|
853
853
|
|
|
854
854
|
## `eggs wardrobe show [COSTUME]`
|
|
@@ -910,10 +910,10 @@ EXAMPLES
|
|
|
910
910
|
```
|
|
911
911
|
<!-- commandsstop -->
|
|
912
912
|
|
|
913
|
-
# Penguins' eggs official
|
|
913
|
+
# Penguins' eggs official guide
|
|
914
914
|
The original edition of the eggs manual is released in Italian, of course other languages can be accessed using machine translation:
|
|
915
915
|
|
|
916
|
-
[Penguins' eggs official
|
|
916
|
+
[Penguins' eggs official guide](https://penguins-eggs.net/docs/Tutorial/users-guide)
|
|
917
917
|
|
|
918
918
|
A nice thing to do to help users could be to make terminal samples, I did this some time ago, but they should be updated.
|
|
919
919
|
|
|
@@ -923,7 +923,7 @@ A nice thing to do to help users could be to make terminal samples, I did this s
|
|
|
923
923
|
No need other configurations, penguins-eggs are battery included or better, as in the real, live is inside! :-D
|
|
924
924
|
|
|
925
925
|
# More informations
|
|
926
|
-
There is a [Penguins' eggs official
|
|
926
|
+
There is a [Penguins' eggs official guide](https://penguins-eggs.net/docs/Tutorial/users-guide) and same other documentation - mostly for developers - on the repository [penguins-eggs](https://github.com/pieroproietti/penguins-eggs) under [documents](https://github.com/pieroproietti/penguins-eggs/tree/master/documents). I want to point out [hens, differents species](https://github.com/pieroproietti/penguins-eggs/blob/master/documents/hens-different-species.md) a brief how to use eggs in Debian. Arch and Manjaro, and the post [Arch-naked](https://penguins-eggs.net/docs/Tutorial/archlinux-naked.html) on the blog which describes how to create an Arch naked live, install it, then dress the resulting system with a graphics development station.
|
|
927
927
|
|
|
928
928
|
You can contact me by [mail](mailto://pieroproietti@gmail.com) or follow me on
|
|
929
929
|
[blog](https://penguins-eggs.net),
|
package/addons/README.md
CHANGED
|
@@ -67,7 +67,7 @@ video window;
|
|
|
67
67
|
* __--rsupport__ create an icon for [dwagent](https://www.dwservice.net) that must be installed locally.
|
|
68
68
|
|
|
69
69
|
# More informations
|
|
70
|
-
There is a [Penguins' eggs official
|
|
70
|
+
There is a [Penguins' eggs official guide](https://penguins-eggs.net/docs/Tutorial/users-guide) and same other documentation - mostly for developers - on [penguins-eggs repo](https://github.com/pieroproietti/penguins-eggs) under **documents** and **i386**.
|
|
71
71
|
|
|
72
72
|
* [Penguins' eggs blog](https://penguins-eggs.net)
|
|
73
73
|
* [facebook Penguins' eggs group](https://www.facebook.com/groups/128861437762355/)
|
package/dist/classes/tailor.js
CHANGED
|
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
* penguins-eggs: tailor.ts
|
|
8
|
+
* author: Piero Proietti
|
|
9
|
+
* mail: piero.proietti@gmail.com
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
12
|
const chalk_1 = __importDefault(require("chalk"));
|
|
13
13
|
const utils_1 = __importDefault(require("./utils"));
|
|
14
14
|
const utils_2 = require("../lib/utils");
|
|
@@ -20,13 +20,13 @@ const distro_1 = __importDefault(require("./distro"));
|
|
|
20
20
|
const sources_list_1 = __importDefault(require("./sources_list"));
|
|
21
21
|
const pjson = require('../../package.json');
|
|
22
22
|
/**
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
25
|
class Tailor {
|
|
26
26
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
* @param wardrobe
|
|
28
|
+
* @param costume
|
|
29
|
+
*/
|
|
30
30
|
constructor(costume, category = 'costume') {
|
|
31
31
|
this.verbose = false;
|
|
32
32
|
this.echo = {};
|
|
@@ -39,20 +39,73 @@ class Tailor {
|
|
|
39
39
|
this.category = category;
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
44
|
async prepare(verbose = true, no_accessories = false, no_firmwares = false) {
|
|
45
45
|
this.verbose = verbose;
|
|
46
46
|
this.echo = utils_1.default.setEcho(verbose);
|
|
47
47
|
utils_1.default.warning(`preparing ${this.costume}`);
|
|
48
48
|
/**
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
* check curl presence
|
|
50
|
+
*/
|
|
51
51
|
if (!pacman_1.default.packageIsInstalled('curl')) {
|
|
52
52
|
utils_1.default.pressKeyToExit('In this tailoring shop we use curl. sudo apt update | apt install curl');
|
|
53
53
|
process.exit();
|
|
54
54
|
}
|
|
55
|
-
|
|
55
|
+
// Analyze distro
|
|
56
|
+
let distro = new distro_1.default();
|
|
57
|
+
let tailorList = '';
|
|
58
|
+
if (distro.distroLike === 'Debian') {
|
|
59
|
+
tailorList = `${this.costume}/debian.yml`;
|
|
60
|
+
if (!fs_1.default.existsSync(tailorList)) {
|
|
61
|
+
tailorList = `${this.costume}/devuan.yml`;
|
|
62
|
+
if (!fs_1.default.existsSync(tailorList)) {
|
|
63
|
+
tailorList = `${this.costume}/ubuntu.yml`;
|
|
64
|
+
if (!fs_1.default.existsSync(tailorList)) {
|
|
65
|
+
console.log(`no costume definition found compatible Debian`);
|
|
66
|
+
process.exit();
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
else if (distro.distroLike === 'Devuan') {
|
|
72
|
+
tailorList = `${this.costume}/devuan.yml`;
|
|
73
|
+
if (!fs_1.default.existsSync(tailorList)) {
|
|
74
|
+
tailorList = `${this.costume}/debian.yml`;
|
|
75
|
+
if (!fs_1.default.existsSync(tailorList)) {
|
|
76
|
+
tailorList = `${this.costume}/ubuntu.yml`;
|
|
77
|
+
if (!fs_1.default.existsSync(tailorList)) {
|
|
78
|
+
console.log(`no costume definition found compatible Devuan`);
|
|
79
|
+
process.exit();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
else if (distro.distroLike === 'Ubuntu') {
|
|
85
|
+
tailorList = `${this.costume}/ubuntu.yml`;
|
|
86
|
+
if (!fs_1.default.existsSync(tailorList)) {
|
|
87
|
+
tailorList = `${this.costume}/debian.yml`;
|
|
88
|
+
console.log(`trying ` + tailorList);
|
|
89
|
+
if (!fs_1.default.existsSync(tailorList)) {
|
|
90
|
+
tailorList = `${this.costume}/devuan.yml`;
|
|
91
|
+
console.log(`trying ` + tailorList);
|
|
92
|
+
if (!fs_1.default.existsSync(tailorList)) {
|
|
93
|
+
console.log(`no costume definition found compatible Ubuntu`);
|
|
94
|
+
process.exit();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
else if (distro.distroLike === 'Arch') {
|
|
100
|
+
tailorList = `${this.costume}/arch.yml`;
|
|
101
|
+
if (!fs_1.default.existsSync(tailorList)) {
|
|
102
|
+
tailorList = `${this.costume}/debian.yml`;
|
|
103
|
+
if (!fs_1.default.existsSync(tailorList)) {
|
|
104
|
+
console.log(`no costume definition found compatible Arch`);
|
|
105
|
+
process.exit();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
56
109
|
if (fs_1.default.existsSync(tailorList)) {
|
|
57
110
|
this.materials = js_yaml_1.default.load(fs_1.default.readFileSync(tailorList, 'utf-8'));
|
|
58
111
|
}
|
|
@@ -79,10 +132,9 @@ class Tailor {
|
|
|
79
132
|
// No default
|
|
80
133
|
}
|
|
81
134
|
/**
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
const distro = new distro_1.default();
|
|
135
|
+
* distro e sources_list
|
|
136
|
+
* vengono definite qua perchè servono a tutti
|
|
137
|
+
*/
|
|
86
138
|
const sources_list = new sources_list_1.default();
|
|
87
139
|
let step = '';
|
|
88
140
|
if (this.materials.distributions !== undefined) {
|
|
@@ -113,208 +165,219 @@ class Tailor {
|
|
|
113
165
|
}
|
|
114
166
|
}
|
|
115
167
|
/**
|
|
116
|
-
|
|
117
|
-
|
|
168
|
+
* sequence
|
|
169
|
+
*/
|
|
118
170
|
if (this.materials.sequence !== undefined) {
|
|
119
171
|
step = 'analyzing sequence';
|
|
120
172
|
utils_1.default.warning(step);
|
|
121
173
|
/**
|
|
122
|
-
|
|
123
|
-
|
|
174
|
+
* sequence/repositories
|
|
175
|
+
*/
|
|
124
176
|
if (this.materials.sequence.repositories !== undefined) {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
177
|
+
if (distro.familyId === "debian") {
|
|
178
|
+
/**
|
|
179
|
+
* sequence/repositories/sources_list
|
|
180
|
+
*/
|
|
181
|
+
// evito di fallire se sources_list non è presente
|
|
182
|
+
if (this.materials.sequence.repositories.sources_list !== undefined) {
|
|
183
|
+
step = 'analyzing repositories';
|
|
184
|
+
utils_1.default.warning(step);
|
|
185
|
+
if (distro.familyId === 'debian') {
|
|
186
|
+
await sources_list.components(this.materials.sequence.repositories.sources_list);
|
|
187
|
+
}
|
|
135
188
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
189
|
+
/**
|
|
190
|
+
* sequence/repositories/sources_list_d
|
|
191
|
+
*/
|
|
192
|
+
if (this.materials.sequence.repositories.sources_list_d !== undefined && this.materials.sequence.repositories.sources_list_d[0] !== null) {
|
|
193
|
+
step = 'adding repositories to /etc/apt/sources_list_d';
|
|
194
|
+
utils_1.default.warning(step);
|
|
195
|
+
for (const cmd of this.materials.sequence.repositories.sources_list_d) {
|
|
196
|
+
try {
|
|
197
|
+
// repeat 3 times if fail curl or others commands
|
|
198
|
+
for (let i = 0; i < 2; i++) {
|
|
199
|
+
const result = await (0, utils_2.exec)(cmd, this.echo);
|
|
200
|
+
if (result.code === 0) {
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
150
203
|
}
|
|
151
204
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
205
|
+
catch (error) {
|
|
206
|
+
await utils_1.default.pressKeyToExit(JSON.stringify(error));
|
|
207
|
+
}
|
|
155
208
|
}
|
|
156
209
|
}
|
|
157
210
|
}
|
|
158
211
|
/**
|
|
159
|
-
|
|
160
|
-
|
|
212
|
+
* sequence/repositories/update
|
|
213
|
+
*/
|
|
161
214
|
if (this.materials.sequence.repositories.update === undefined) {
|
|
162
|
-
console.log('repositiories, and repositories.update MUST be defined on sequence
|
|
215
|
+
console.log('repositiories, and repositories.update MUST be defined on sequence');
|
|
163
216
|
process.exit();
|
|
164
217
|
}
|
|
165
|
-
step = '
|
|
218
|
+
step = 'repositories update';
|
|
166
219
|
utils_1.default.warning(step);
|
|
167
220
|
if (this.materials.sequence.repositories.update) {
|
|
168
|
-
|
|
221
|
+
if (distro.familyId === "debian") {
|
|
222
|
+
await (0, utils_2.exec)('apt-get update', utils_1.default.setEcho(false));
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
await (0, utils_2.exec)('pacman -Sy', utils_1.default.setEcho(false));
|
|
226
|
+
}
|
|
169
227
|
}
|
|
170
228
|
/**
|
|
171
|
-
|
|
172
|
-
|
|
229
|
+
* sequence/repositories/upgrade
|
|
230
|
+
*/
|
|
173
231
|
if (this.materials.sequence.repositories.upgrade !== undefined) {
|
|
174
|
-
step = '
|
|
232
|
+
step = 'repositories upgrade';
|
|
175
233
|
utils_1.default.warning(step);
|
|
176
234
|
if (this.materials.sequence.repositories.upgrade) {
|
|
177
|
-
|
|
235
|
+
if (distro.familyId === "debian") {
|
|
236
|
+
await (0, utils_2.exec)('apt-get full-upgrade -y', utils_1.default.setEcho(false));
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
await (0, utils_2.exec)('pacman -Su', utils_1.default.setEcho(false));
|
|
240
|
+
}
|
|
241
|
+
} // upgrade true
|
|
242
|
+
} // undefined upgrade
|
|
243
|
+
} // end sequence/repositories
|
|
244
|
+
/**
|
|
245
|
+
* sequence/preinst
|
|
246
|
+
*/
|
|
247
|
+
if (this.materials.sequence.preinst !== undefined && Array.isArray(this.materials.sequence.preinst)) {
|
|
248
|
+
step = 'preinst scripts';
|
|
249
|
+
utils_1.default.warning(step);
|
|
250
|
+
for (const script of this.materials.sequence.preinst) {
|
|
251
|
+
if (fs_1.default.existsSync(`${this.costume}/${script}`)) {
|
|
252
|
+
await (0, utils_2.exec)(`${this.costume}/${script}`, utils_1.default.setEcho(true));
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
// exec script real env
|
|
256
|
+
await (0, utils_2.exec)(`${script}`, utils_1.default.setEcho(true));
|
|
178
257
|
}
|
|
179
258
|
}
|
|
180
259
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
await (0, utils_2.exec)(`${this.costume}/${script}`, utils_1.default.setEcho(true));
|
|
260
|
+
/**
|
|
261
|
+
* install packages
|
|
262
|
+
*/
|
|
263
|
+
if (this.materials.sequence.packages !== undefined) {
|
|
264
|
+
if (distro.familyId === 'debian') {
|
|
265
|
+
const packages = await this.helperExists(this.materials.sequence.packages, true, 'packages');
|
|
266
|
+
if (packages.length > 1) {
|
|
267
|
+
await this.helperInstall(packages);
|
|
268
|
+
}
|
|
191
269
|
}
|
|
192
270
|
else {
|
|
193
|
-
|
|
194
|
-
await (0, utils_2.exec)(`${script}`, utils_1.default.setEcho(true));
|
|
271
|
+
await this.helperInstall(this.materials.sequence.packages, 'packages', `pacman -Sy --noconfirm`);
|
|
195
272
|
}
|
|
196
273
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* apt-get install packages
|
|
209
|
-
*/
|
|
210
|
-
if (this.materials.sequence.packages !== undefined) {
|
|
211
|
-
const packages = await this.helperExists(this.materials.sequence.packages, true, 'packages');
|
|
212
|
-
if (packages.length > 1) {
|
|
213
|
-
await this.helperInstall(packages);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* sequence/packages_no_install_recommends
|
|
218
|
-
*/
|
|
219
|
-
if (this.materials.sequence.packages_no_install_recommends !== undefined) {
|
|
220
|
-
const packages_no_install_recommends = await this.helperExists(this.materials.sequence.packages_no_install_recommends, true, 'packages_no_install_recommends');
|
|
221
|
-
if (packages_no_install_recommends.length > 1) {
|
|
222
|
-
await this.helperInstall(packages_no_install_recommends, 'packages without recommends and suggests', 'apt-get install --no-install-recommends --no-install-suggests -yq ');
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* apt-get TRY install packages
|
|
227
|
-
*/
|
|
228
|
-
if (this.materials.sequence.try_packages !== undefined) {
|
|
229
|
-
const try_packages = await this.helperExists(this.materials.sequence.try_packages, false);
|
|
230
|
-
if (try_packages.length > 1) {
|
|
231
|
-
await this.helperInstall(try_packages, 'try packages ');
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* apt-get TRY packages_no_install_recommends
|
|
236
|
-
*/
|
|
237
|
-
if (this.materials.sequence.try_packages_no_install_recommends !== undefined) {
|
|
238
|
-
const try_packages_no_install_recommends = await this.helperExists(this.materials.sequence.try_packages_no_install_recommends, false);
|
|
239
|
-
if (try_packages_no_install_recommends.length > 1) {
|
|
240
|
-
await this.helperInstall(try_packages_no_install_recommends, 'try packages without recommends and suggests', 'apt-get install --no-install-recommends --no-install-suggests -yq ');
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
* sequence/debs
|
|
245
|
-
*/
|
|
246
|
-
if (this.materials.sequence.debs !== undefined && this.materials.sequence.debs) {
|
|
247
|
-
step = 'installing local packages';
|
|
248
|
-
utils_1.default.warning(step);
|
|
249
|
-
let pathDebs = `${this.costume}/debs/${distro.codenameLikeId}`;
|
|
250
|
-
if (!fs_1.default.existsSync(pathDebs)) {
|
|
251
|
-
pathDebs = `${this.costume}/debs`;
|
|
252
|
-
}
|
|
253
|
-
// if exists pathDebs
|
|
254
|
-
if (fs_1.default.existsSync(pathDebs)) {
|
|
255
|
-
await (0, utils_2.exec)(`dpkg -i ${pathDebs}/*.deb`);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* sequence/packages_python
|
|
260
|
-
*/
|
|
261
|
-
if (this.materials.sequence.packages_python !== undefined && Array.isArray(this.materials.sequence.packages_python)) {
|
|
262
|
-
let cmd = 'pip install ';
|
|
263
|
-
let pip = '';
|
|
264
|
-
for (const elem of this.materials.sequence.packages_python) {
|
|
265
|
-
cmd += ` ${elem}`;
|
|
266
|
-
pip += `, ${elem}`;
|
|
267
|
-
}
|
|
268
|
-
step = `installing python packages pip ${pip.slice(2)}`;
|
|
269
|
-
utils_1.default.warning(step);
|
|
270
|
-
await (0, utils_2.exec)(cmd, this.echo);
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* sequence/accessories
|
|
274
|
-
*/
|
|
275
|
-
if (!no_accessories) {
|
|
276
|
-
// accessories
|
|
277
|
-
if (this.materials.sequence.accessories !== undefined && Array.isArray(this.materials.sequence.accessories)) {
|
|
278
|
-
step = 'wearing accessories';
|
|
279
|
-
for (const elem of this.materials.sequence.accessories) {
|
|
280
|
-
if ((elem === 'firmwares' || elem === './firmwares') && no_firmwares) {
|
|
281
|
-
continue;
|
|
282
|
-
}
|
|
283
|
-
if (elem.slice(0, 2) === './') {
|
|
284
|
-
const tailor = new Tailor(`${this.costume}/${elem.slice(2)}`, 'accessory');
|
|
285
|
-
await tailor.prepare(verbose);
|
|
274
|
+
if (distro.familyId === "debian") {
|
|
275
|
+
/**
|
|
276
|
+
* sequence/packages_no_install_recommends
|
|
277
|
+
*/
|
|
278
|
+
if (this.materials.sequence.packages_no_install_recommends !== undefined) {
|
|
279
|
+
const packages_no_install_recommends = await this.helperExists(this.materials.sequence.packages_no_install_recommends, true, 'packages_no_install_recommends');
|
|
280
|
+
if (packages_no_install_recommends.length > 1) {
|
|
281
|
+
await this.helperInstall(packages_no_install_recommends, 'packages without recommends and suggests', 'apt-get install --no-install-recommends --no-install-suggests -yq ');
|
|
286
282
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* sequence/try_packages
|
|
286
|
+
*/
|
|
287
|
+
if (this.materials.sequence.try_packages !== undefined) {
|
|
288
|
+
const try_packages = await this.helperExists(this.materials.sequence.try_packages, false);
|
|
289
|
+
if (try_packages.length > 1) {
|
|
290
|
+
await this.helperInstall(try_packages, 'try packages ');
|
|
290
291
|
}
|
|
291
292
|
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
if (
|
|
298
|
-
|
|
293
|
+
/**
|
|
294
|
+
* sequence/try_packages_no_install_recommends
|
|
295
|
+
*/
|
|
296
|
+
if (this.materials.sequence.try_packages_no_install_recommends !== undefined) {
|
|
297
|
+
const try_packages_no_install_recommends = await this.helperExists(this.materials.sequence.try_packages_no_install_recommends, false);
|
|
298
|
+
if (try_packages_no_install_recommends.length > 1) {
|
|
299
|
+
await this.helperInstall(try_packages_no_install_recommends, 'try packages without recommends and suggests', 'apt-get install --no-install-recommends --no-install-suggests -yq ');
|
|
299
300
|
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* sequence/debs
|
|
304
|
+
*/
|
|
305
|
+
if (this.materials.sequence.debs !== undefined && this.materials.sequence.debs) {
|
|
306
|
+
step = 'installing local packages';
|
|
307
|
+
utils_1.default.warning(step);
|
|
308
|
+
let pathDebs = `${this.costume}/debs/${distro.codenameLikeId}`;
|
|
309
|
+
if (!fs_1.default.existsSync(pathDebs)) {
|
|
310
|
+
pathDebs = `${this.costume}/debs`;
|
|
303
311
|
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
await
|
|
312
|
+
// if exists pathDebs
|
|
313
|
+
if (fs_1.default.existsSync(pathDebs)) {
|
|
314
|
+
await (0, utils_2.exec)(`dpkg -i ${pathDebs}/*.deb`);
|
|
307
315
|
}
|
|
308
316
|
}
|
|
309
317
|
}
|
|
310
|
-
|
|
318
|
+
/**
|
|
319
|
+
* sequence/packages_python
|
|
320
|
+
*/
|
|
321
|
+
if (this.materials.sequence.packages_python !== undefined && Array.isArray(this.materials.sequence.packages_python)) {
|
|
322
|
+
let cmd = 'pip install ';
|
|
323
|
+
let pip = '';
|
|
324
|
+
for (const elem of this.materials.sequence.packages_python) {
|
|
325
|
+
cmd += ` ${elem}`;
|
|
326
|
+
pip += `, ${elem}`;
|
|
327
|
+
}
|
|
328
|
+
step = `installing python packages pip ${pip.slice(2)}`;
|
|
329
|
+
utils_1.default.warning(step);
|
|
330
|
+
await (0, utils_2.exec)(cmd, this.echo);
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* sequence/accessories
|
|
334
|
+
*/
|
|
335
|
+
if (!no_accessories) {
|
|
336
|
+
// accessories
|
|
337
|
+
if (this.materials.sequence.accessories !== undefined && Array.isArray(this.materials.sequence.accessories)) {
|
|
338
|
+
step = 'wearing accessories';
|
|
339
|
+
for (const elem of this.materials.sequence.accessories) {
|
|
340
|
+
if ((elem === 'firmwares' || elem === './firmwares') && no_firmwares) {
|
|
341
|
+
continue;
|
|
342
|
+
}
|
|
343
|
+
if (elem.slice(0, 2) === './') {
|
|
344
|
+
const tailor = new Tailor(`${this.costume}/${elem.slice(2)}`, 'accessory');
|
|
345
|
+
await tailor.prepare(verbose);
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
const tailor = new Tailor(`${this.wardrobe}/accessories/${elem}`, 'accessory');
|
|
349
|
+
await tailor.prepare(verbose);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
if (distro.familyId === "debian") {
|
|
354
|
+
// try_accessories
|
|
355
|
+
if (this.materials.sequence.try_accessories !== undefined && Array.isArray(this.materials.sequence.try_accessories)) {
|
|
356
|
+
step = 'wearing try_accessories';
|
|
357
|
+
for (const elem of this.materials.sequence.try_accessories) {
|
|
358
|
+
if ((elem === 'firmwares' || elem === './firmwares') && no_firmwares) {
|
|
359
|
+
continue;
|
|
360
|
+
}
|
|
361
|
+
if (elem.slice(0, 2) === './') {
|
|
362
|
+
const tailor = new Tailor(`${this.costume}/${elem.slice(2)}`, 'try_accessory');
|
|
363
|
+
await tailor.prepare(verbose);
|
|
364
|
+
}
|
|
365
|
+
else {
|
|
366
|
+
const tailor = new Tailor(`${this.wardrobe}/accessories/${elem}`, 'try_accessory');
|
|
367
|
+
await tailor.prepare(verbose);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
} // no-accessories
|
|
373
|
+
} // end sequence
|
|
311
374
|
/**
|
|
312
375
|
* customize
|
|
313
376
|
*/
|
|
314
377
|
if (this.materials.customize !== undefined) {
|
|
315
378
|
/**
|
|
316
|
-
|
|
317
|
-
|
|
379
|
+
* customize/dirs
|
|
380
|
+
*/
|
|
318
381
|
if (this.materials.customize.dirs && fs_1.default.existsSync(`/${this.costume}/dirs`)) {
|
|
319
382
|
step = 'copying dirs';
|
|
320
383
|
utils_1.default.warning(step);
|
|
@@ -324,8 +387,8 @@ class Tailor {
|
|
|
324
387
|
cmd = 'chown root:root /etc/sudoers.d /etc/skel -R';
|
|
325
388
|
await (0, utils_2.exec)(cmd, this.echo);
|
|
326
389
|
/**
|
|
327
|
-
|
|
328
|
-
|
|
390
|
+
* Copyng skel in /home/user
|
|
391
|
+
*/
|
|
329
392
|
if (fs_1.default.existsSync(`${this.costume}/dirs/etc/skel`)) {
|
|
330
393
|
const user = await utils_1.default.getPrimaryUser();
|
|
331
394
|
step = `copying skel in /home/${user}/`;
|
|
@@ -336,15 +399,8 @@ class Tailor {
|
|
|
336
399
|
}
|
|
337
400
|
}
|
|
338
401
|
/**
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
if (this.materials.customize.hostname) {
|
|
342
|
-
utils_1.default.warning(`changing hostname = ${this.materials.name}`);
|
|
343
|
-
await this.hostname();
|
|
344
|
-
}
|
|
345
|
-
/**
|
|
346
|
-
* customize/scripts
|
|
347
|
-
*/
|
|
402
|
+
* customize/scripts
|
|
403
|
+
*/
|
|
348
404
|
if (this.materials.customize.scripts !== undefined && Array.isArray(this.materials.customize.scripts)) {
|
|
349
405
|
step = 'customize script';
|
|
350
406
|
utils_1.default.warning(step);
|
|
@@ -361,8 +417,8 @@ class Tailor {
|
|
|
361
417
|
}
|
|
362
418
|
}
|
|
363
419
|
/**
|
|
364
|
-
|
|
365
|
-
|
|
420
|
+
* reboot
|
|
421
|
+
*/
|
|
366
422
|
if (this.materials.reboot) {
|
|
367
423
|
utils_1.default.warning('Reboot');
|
|
368
424
|
await utils_1.default.pressKeyToExit('system need to reboot', true);
|
|
@@ -373,12 +429,12 @@ class Tailor {
|
|
|
373
429
|
}
|
|
374
430
|
}
|
|
375
431
|
/**
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
432
|
+
*
|
|
433
|
+
* @param packages
|
|
434
|
+
* @param verbose
|
|
435
|
+
* @param section
|
|
436
|
+
* @returns
|
|
437
|
+
*/
|
|
382
438
|
async helperExists(packages, verbose = false, section = '') {
|
|
383
439
|
const packages_we_want = '/tmp/packages_we_want';
|
|
384
440
|
const packages_not_exists = '/tmp/packages_not_exists';
|
|
@@ -387,8 +443,8 @@ class Tailor {
|
|
|
387
443
|
await (0, utils_2.exec)(`rm -f ${packages_not_exists}`);
|
|
388
444
|
await (0, utils_2.exec)(`rm -f ${packages_exists}`);
|
|
389
445
|
/**
|
|
390
|
-
|
|
391
|
-
|
|
446
|
+
* packages_we_want
|
|
447
|
+
*/
|
|
392
448
|
let content = '';
|
|
393
449
|
packages.sort();
|
|
394
450
|
for (const elem of packages) {
|
|
@@ -398,14 +454,25 @@ class Tailor {
|
|
|
398
454
|
}
|
|
399
455
|
fs_1.default.writeFileSync(packages_we_want, content, 'utf-8');
|
|
400
456
|
/**
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
457
|
+
* packages_exists
|
|
458
|
+
*/
|
|
459
|
+
let distro = new distro_1.default();
|
|
460
|
+
if (distro.familyId === 'debian') {
|
|
461
|
+
await (0, utils_2.exec)(`apt-cache --no-generate pkgnames | sort | comm -12 - ${packages_we_want} > ${packages_exists}`);
|
|
462
|
+
}
|
|
463
|
+
else {
|
|
464
|
+
await (0, utils_2.exec)(`pacman -S --list | awk '{print $2}' | sort | comm -12 - ${packages_we_want} > ${packages_exists}`);
|
|
465
|
+
}
|
|
404
466
|
/**
|
|
405
|
-
|
|
406
|
-
|
|
467
|
+
* packages_not_exists
|
|
468
|
+
*/
|
|
407
469
|
if (verbose) {
|
|
408
|
-
|
|
470
|
+
if (distro.familyId === "debian") {
|
|
471
|
+
await (0, utils_2.exec)(`apt-cache --no-generate pkgnames | sort | comm -13 - ${packages_we_want} > ${packages_not_exists}`);
|
|
472
|
+
}
|
|
473
|
+
else {
|
|
474
|
+
await (0, utils_2.exec)(`pacman -S --list | awk '{print $2}' | sort | comm -13 - ${packages_we_want} > ${packages_not_exists}`);
|
|
475
|
+
}
|
|
409
476
|
const not_exist_packages = fs_1.default.readFileSync(packages_not_exists, 'utf-8').split('\n');
|
|
410
477
|
if (not_exist_packages.length > 1) { // Una riga c'è sempre
|
|
411
478
|
let content = '';
|
|
@@ -422,9 +489,9 @@ class Tailor {
|
|
|
422
489
|
return fs_1.default.readFileSync(packages_exists, 'utf-8').split('\n');
|
|
423
490
|
}
|
|
424
491
|
/**
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
492
|
+
* - check if every package if installed
|
|
493
|
+
* - if find any packages to install, install it
|
|
494
|
+
*/
|
|
428
495
|
async helperInstall(packages, comment = 'packages', cmd = 'apt-get install -yqq ') {
|
|
429
496
|
if (packages[0] !== null) {
|
|
430
497
|
const elements = [];
|
|
@@ -441,8 +508,8 @@ class Tailor {
|
|
|
441
508
|
step += strElements.slice(2);
|
|
442
509
|
}
|
|
443
510
|
/**
|
|
444
|
-
|
|
445
|
-
|
|
511
|
+
* prova 3 volte
|
|
512
|
+
*/
|
|
446
513
|
const limit = 3;
|
|
447
514
|
for (let tempts = 1; tempts < limit; tempts++) {
|
|
448
515
|
this.titles(step);
|
|
@@ -454,41 +521,6 @@ class Tailor {
|
|
|
454
521
|
}
|
|
455
522
|
}
|
|
456
523
|
}
|
|
457
|
-
/**
|
|
458
|
-
* hostname and hosts
|
|
459
|
-
*/
|
|
460
|
-
async hostname() {
|
|
461
|
-
/**
|
|
462
|
-
* hostname
|
|
463
|
-
*/
|
|
464
|
-
let file = '/etc/hostname';
|
|
465
|
-
let text = this.materials.name;
|
|
466
|
-
await (0, utils_2.exec)(`rm ${file} `, this.echo);
|
|
467
|
-
fs_1.default.writeFileSync(file, text);
|
|
468
|
-
/**
|
|
469
|
-
* hosts
|
|
470
|
-
*/
|
|
471
|
-
file = '/etc/hosts';
|
|
472
|
-
text = '';
|
|
473
|
-
text += '127.0.0.1 localhost localhost.localdomain\n';
|
|
474
|
-
text += `127.0.1.1 ${this.materials.name} \n`;
|
|
475
|
-
text += '# The following lines are desirable for IPv6 capable hosts\n';
|
|
476
|
-
text += ':: 1 ip6 - localhost ip6 - loopback\n';
|
|
477
|
-
text += 'fe00:: 0 ip6 - localnet\n';
|
|
478
|
-
text += 'ff00:: 0 ip6 - mcastprefix\n';
|
|
479
|
-
text += 'ff02:: 1 ip6 - allnodes\n';
|
|
480
|
-
text += 'ff02:: 2 ip6 - allrouters\n';
|
|
481
|
-
text += 'ff02:: 3 ip6 - allhosts\n';
|
|
482
|
-
await (0, utils_2.exec)(`rm ${file} `, this.echo);
|
|
483
|
-
fs_1.default.writeFileSync(file, text);
|
|
484
|
-
/**
|
|
485
|
-
* chenge config.snapshot.basename
|
|
486
|
-
*/
|
|
487
|
-
const config_file = '/etc/penguins-eggs.d/eggs.yaml';
|
|
488
|
-
const config = js_yaml_1.default.load(fs_1.default.readFileSync(config_file, 'utf-8'));
|
|
489
|
-
config.snapshot_basename = this.materials.name;
|
|
490
|
-
fs_1.default.writeFileSync(config_file, js_yaml_1.default.dump(config), 'utf-8');
|
|
491
|
-
}
|
|
492
524
|
/**
|
|
493
525
|
*
|
|
494
526
|
* @param command
|
|
@@ -36,7 +36,9 @@ class Get extends core_1.Command {
|
|
|
36
36
|
process.exit(0);
|
|
37
37
|
}
|
|
38
38
|
const wardrobe = (0, path_1.basename)(repo); // ~/.eggs-wardrobe
|
|
39
|
-
|
|
39
|
+
// git clone -b <branchname> --single-branch
|
|
40
|
+
// const result = await exec(`git clone -b devel --single-branch --depth 1 ${repo} ${await Utils.wardrobe()}`)
|
|
41
|
+
const result = await (0, utils_2.exec)(`git clone --single-branch --depth 1 ${repo} ${await utils_1.default.wardrobe()}`);
|
|
40
42
|
if (result.code === 0) {
|
|
41
43
|
utils_1.default.warning(`you get new wardrobe from repo: ${repo} in ${await utils_1.default.wardrobe()}`);
|
|
42
44
|
}
|
|
@@ -14,6 +14,7 @@ const utils_1 = __importDefault(require("../../classes/utils"));
|
|
|
14
14
|
const path_1 = __importDefault(require("path"));
|
|
15
15
|
const js_yaml_1 = __importDefault(require("js-yaml"));
|
|
16
16
|
const fs_1 = __importDefault(require("fs"));
|
|
17
|
+
const distro_1 = __importDefault(require("../../classes/distro"));
|
|
17
18
|
// libraries
|
|
18
19
|
const chalk_1 = __importDefault(require("chalk"));
|
|
19
20
|
/**
|
|
@@ -32,24 +33,44 @@ class List extends core_1.Command {
|
|
|
32
33
|
* wardobe
|
|
33
34
|
*/
|
|
34
35
|
let wardrobe = await utils_1.default.wardrobe();
|
|
35
|
-
if (
|
|
36
|
-
|
|
36
|
+
if (flags.distro === undefined) {
|
|
37
|
+
if (this.argv['0'] !== undefined) {
|
|
38
|
+
wardrobe = this.argv['0'];
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* seleziona distro
|
|
43
|
+
*/
|
|
44
|
+
let index = '';
|
|
45
|
+
let distro = new distro_1.default();
|
|
46
|
+
if (distro.distroLike === "Arch") {
|
|
47
|
+
index = 'arch';
|
|
48
|
+
}
|
|
49
|
+
else if (distro.distroLike === "Debian" || distro.distroLike === "Devuan") {
|
|
50
|
+
index = 'debian';
|
|
51
|
+
}
|
|
52
|
+
else if (distro.distroLike === "Ubuntu") {
|
|
53
|
+
index = 'ubuntu';
|
|
37
54
|
}
|
|
55
|
+
if (flags.distro !== undefined) {
|
|
56
|
+
index = flags.distro;
|
|
57
|
+
}
|
|
58
|
+
index += '.yml';
|
|
59
|
+
console.log(chalk_1.default.green('wardrobe: ') + wardrobe);
|
|
60
|
+
console.log();
|
|
38
61
|
wardrobe = `${path_1.default.resolve(process.cwd(), wardrobe)}/`;
|
|
39
62
|
if (!fs_1.default.existsSync(wardrobe)) {
|
|
40
63
|
utils_1.default.warning(`wardrobe: ${wardrobe} not found!`);
|
|
41
64
|
process.exit();
|
|
42
65
|
}
|
|
43
|
-
console.log(chalk_1.default.green('wardrobe: ') + wardrobe);
|
|
44
|
-
console.log();
|
|
45
66
|
/**
|
|
46
67
|
* costumes
|
|
47
68
|
*/
|
|
48
69
|
const costumes = fs_1.default.readdirSync(`${wardrobe}costumes/`);
|
|
49
70
|
console.log(chalk_1.default.green('costumes: '));
|
|
50
71
|
for (const costume of costumes) {
|
|
51
|
-
if (fs_1.default.existsSync(`${wardrobe}costumes/${costume}
|
|
52
|
-
const materials = js_yaml_1.default.load(fs_1.default.readFileSync(`${wardrobe}costumes/${costume}
|
|
72
|
+
if (fs_1.default.existsSync(`${wardrobe}costumes/${costume}/${index}`)) {
|
|
73
|
+
const materials = js_yaml_1.default.load(fs_1.default.readFileSync(`${wardrobe}costumes/${costume}/${index}`, 'utf-8'));
|
|
53
74
|
console.log(chalk_1.default.cyan(costume) + ': ' + materials.description);
|
|
54
75
|
}
|
|
55
76
|
}
|
|
@@ -60,8 +81,8 @@ class List extends core_1.Command {
|
|
|
60
81
|
const accessories = fs_1.default.readdirSync(`${wardrobe}/accessories/`);
|
|
61
82
|
console.log(chalk_1.default.green('accessories: '));
|
|
62
83
|
for (const accessory of accessories) {
|
|
63
|
-
if (fs_1.default.existsSync(`${wardrobe}/accessories/${accessory}
|
|
64
|
-
const materials = js_yaml_1.default.load(fs_1.default.readFileSync(`${wardrobe}/accessories/${accessory}
|
|
84
|
+
if (fs_1.default.existsSync(`${wardrobe}/accessories/${accessory}/${index}`)) {
|
|
85
|
+
const materials = js_yaml_1.default.load(fs_1.default.readFileSync(`${wardrobe}/accessories/${accessory}/${index}`, 'utf-8'));
|
|
65
86
|
console.log(chalk_1.default.cyan(accessory) + ': ' + materials.description);
|
|
66
87
|
}
|
|
67
88
|
}
|
|
@@ -72,8 +93,8 @@ class List extends core_1.Command {
|
|
|
72
93
|
const servers = fs_1.default.readdirSync(`${wardrobe}/servers/`);
|
|
73
94
|
console.log(chalk_1.default.green('servers: '));
|
|
74
95
|
for (const server of servers) {
|
|
75
|
-
if (fs_1.default.existsSync(`${wardrobe}/servers/${server}
|
|
76
|
-
const materials = js_yaml_1.default.load(fs_1.default.readFileSync(`${wardrobe}/servers/${server}
|
|
96
|
+
if (fs_1.default.existsSync(`${wardrobe}/servers/${server}/${index}`)) {
|
|
97
|
+
const materials = js_yaml_1.default.load(fs_1.default.readFileSync(`${wardrobe}/servers/${server}/${index}`, 'utf-8'));
|
|
77
98
|
console.log(chalk_1.default.cyan(server) + ': ' + materials.description);
|
|
78
99
|
}
|
|
79
100
|
}
|
|
@@ -82,12 +103,14 @@ class List extends core_1.Command {
|
|
|
82
103
|
}
|
|
83
104
|
List.flags = {
|
|
84
105
|
help: core_1.Flags.help({ char: 'h' }),
|
|
106
|
+
distro: core_1.Flags.string({ char: 'd', description: 'distro' }),
|
|
85
107
|
verbose: core_1.Flags.boolean({ char: 'v' }),
|
|
86
108
|
};
|
|
87
109
|
List.args = [{ name: 'wardrobe', description: 'wardrobe', required: false }];
|
|
88
110
|
List.description = 'list costumes and accessoires in wardrobe';
|
|
89
111
|
List.examples = [
|
|
90
112
|
'eggs wardrobe list',
|
|
91
|
-
'eggs wardrobe list your-
|
|
113
|
+
'eggs wardrobe list your-wardrobe',
|
|
114
|
+
'eggs wardrobe list --distro arch',
|
|
92
115
|
];
|
|
93
116
|
exports.default = List;
|
|
@@ -12,6 +12,7 @@ const js_yaml_1 = __importDefault(require("js-yaml"));
|
|
|
12
12
|
const fs_1 = __importDefault(require("fs"));
|
|
13
13
|
const path_1 = __importDefault(require("path"));
|
|
14
14
|
const chalk_1 = __importDefault(require("chalk"));
|
|
15
|
+
const distro_1 = __importDefault(require("../../classes/distro"));
|
|
15
16
|
const utils_1 = __importDefault(require("../../classes/utils"));
|
|
16
17
|
/**
|
|
17
18
|
*
|
|
@@ -51,7 +52,18 @@ class Show extends core_1.Command {
|
|
|
51
52
|
/**
|
|
52
53
|
* tailorList
|
|
53
54
|
*/
|
|
54
|
-
|
|
55
|
+
let distro = new distro_1.default();
|
|
56
|
+
let index = '';
|
|
57
|
+
if (distro.distroLike === "Arch") {
|
|
58
|
+
index = 'arch.yml';
|
|
59
|
+
}
|
|
60
|
+
else if (distro.distroLike === "Debian" || distro.distroLike === "Devuan") {
|
|
61
|
+
index = 'debian.yml';
|
|
62
|
+
}
|
|
63
|
+
else if (distro.distroLike === "Debian") {
|
|
64
|
+
index = 'ubuntu.yml';
|
|
65
|
+
}
|
|
66
|
+
const tailorList = `${costume}/${index}`;
|
|
55
67
|
if (!fs_1.default.existsSync(tailorList)) {
|
|
56
68
|
utils_1.default.warning(`index.yml not found in : ${costume}!`);
|
|
57
69
|
process.exit();
|
|
@@ -46,7 +46,7 @@ class Wear extends core_1.Command {
|
|
|
46
46
|
*/
|
|
47
47
|
let costume = 'costumes/colibri';
|
|
48
48
|
if (this.argv['0'] !== undefined) {
|
|
49
|
-
costume = this.argv['0']; // 12345678
|
|
49
|
+
costume = this.argv['0']; // 12345678 12345678901 1234567
|
|
50
50
|
if (costume.slice(0, 8) !== 'costumes' && costume.slice(0, 11) !== 'accessories' && costume.slice(0, 7) !== 'servers') {
|
|
51
51
|
costume = `costumes/${costume}`;
|
|
52
52
|
}
|
|
@@ -54,15 +54,7 @@ class Wear extends core_1.Command {
|
|
|
54
54
|
costume = wardrobe + costume;
|
|
55
55
|
console.log(costume);
|
|
56
56
|
if (!fs_1.default.existsSync(costume)) {
|
|
57
|
-
|
|
58
|
-
process.exit();
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* tailorList
|
|
62
|
-
*/
|
|
63
|
-
const tailorList = `${costume}/index.yml`;
|
|
64
|
-
if (!fs_1.default.existsSync(tailorList)) {
|
|
65
|
-
utils_1.default.warning(`index.yml not found in : ${costume}!`);
|
|
57
|
+
utils_1.default.warning(`costume not found in : ${costume}!`);
|
|
66
58
|
process.exit();
|
|
67
59
|
}
|
|
68
60
|
if (await utils_1.default.customConfirm(`Prepare your costume: ${costume}? Select yes to continue...`)) {
|
|
@@ -83,7 +75,6 @@ Wear.flags = {
|
|
|
83
75
|
help: core_1.Flags.help({ char: 'h' }),
|
|
84
76
|
no_accessories: core_1.Flags.boolean({ char: 'a', description: 'not install accessories' }),
|
|
85
77
|
no_firmwares: core_1.Flags.boolean({ char: 'f', description: 'not install firmwares' }),
|
|
86
|
-
silent: core_1.Flags.boolean({ char: 's' }),
|
|
87
78
|
verbose: core_1.Flags.boolean({ char: 'v' }),
|
|
88
79
|
wardrobe: core_1.Flags.string({ char: 'w', description: 'wardrobe' }),
|
|
89
80
|
};
|
|
@@ -585,7 +585,7 @@ DESCRIPTION
|
|
|
585
585
|
EXAMPLES
|
|
586
586
|
$ eggs wardrobe list
|
|
587
587
|
|
|
588
|
-
$ eggs wardrobe list your-
|
|
588
|
+
$ eggs wardrobe list your-wardrobe
|
|
589
589
|
</code></pre>
|
|
590
590
|
<h2><code>eggs wardrobe show [COSTUME]</code></h2>
|
|
591
591
|
<p>show costumes/accessories in wardrobe</p>
|
|
@@ -28,7 +28,7 @@ You can use simple USB or USB with ventoy, iso file with proxmox ve, virtualbox,
|
|
|
28
28
|
* penguins-eggs PKGBUILD on [community](https://gitlab.manjaro.org/packages/community/penguins-eggs)
|
|
29
29
|
* penguins-eggs PKGBUILD [my way](https://github.com/pieroproietti/penguins-eggs-manjaro) (*)
|
|
30
30
|
* penguins-eggs [sources](https://github.com/pieroproietti/penguins-eggs)
|
|
31
|
-
* penguins-eggs [book](https://penguins-eggs.net/
|
|
31
|
+
* penguins-eggs [book](https://penguins-eggs.net/docs/Tutorial/users-guide)
|
|
32
32
|
* penguins-eggs [blog](https://penguins-eggs.net)
|
|
33
33
|
|
|
34
34
|
(*) Here we refere always to that, but I hope with same help to solve the problems and have it in community again.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "penguins-eggs",
|
|
3
3
|
"description": "Perri's Brewery edition: remaster your system and distribuite it",
|
|
4
|
-
"version": "9.4.
|
|
4
|
+
"version": "9.4.6",
|
|
5
5
|
"author": "Piero Proietti @pieroproietti",
|
|
6
6
|
"bin": {
|
|
7
7
|
"eggs": "bin/run"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"@oclif/plugin-version": "1.2.1",
|
|
16
16
|
"@oclif/plugin-warn-if-update-available": "^2.0.32",
|
|
17
17
|
"@oclif/test": "^2.3.11",
|
|
18
|
-
"axios": "^1.3.
|
|
18
|
+
"axios": "^1.3.5",
|
|
19
19
|
"chalk": "^4.1.2",
|
|
20
20
|
"etrick": "0.0.3",
|
|
21
21
|
"ink": "^3.2.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"systeminformation": "^5.17.12",
|
|
32
32
|
"tftp": "^0.1.2",
|
|
33
33
|
"tslib": "^2.5.0",
|
|
34
|
-
"typescript": "^5.0.
|
|
34
|
+
"typescript": "^5.0.4"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@tsconfig/recommended": "^1.0.2",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"@types/netmask": "^1.0.30",
|
|
47
47
|
"@types/node": "^18.15.5",
|
|
48
48
|
"@types/node-static": "^0.7.7",
|
|
49
|
-
"@types/react": "^18.0.
|
|
50
|
-
"@types/shelljs": "^0.8.
|
|
51
|
-
"@typescript-eslint/parser": "^5.
|
|
49
|
+
"@types/react": "^18.0.35",
|
|
50
|
+
"@types/shelljs": "^0.8.12",
|
|
51
|
+
"@typescript-eslint/parser": "^5.58.0",
|
|
52
52
|
"chai": "^4.3.7",
|
|
53
53
|
"eslint": "^7",
|
|
54
54
|
"eslint-config-oclif": "^4.0.0",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"/eui",
|
|
75
75
|
"/ipxe",
|
|
76
76
|
"/manpages",
|
|
77
|
-
"/
|
|
78
|
-
"
|
|
77
|
+
"/mkinitcpio",
|
|
78
|
+
"/scripts"
|
|
79
79
|
],
|
|
80
80
|
"homepage": "https://penguins-eggs.net/",
|
|
81
81
|
"keywords": [
|