I put in this repo my scripts. It can be useful like useless.
WARNING!
Always refer to help command inside scripts, this man page may not be up to date!
- Fork it
- Fix it
- Pull request it
But you can also:
- harder
- better
- faster
- stronger
More seriously, yes it can be awful and have issues but I want my code to work. I'm not targeting to be the best and to have the perfect code.
V. 0.1
Script to install google cloud sdk &Cie. Probably out of date. You may need to change the package version in the downloader etc.
V 0.1
Script to generate a password using only built-in command. Light weight and probably not secure, processed files are stored in /tmp (changeable with a VAR in the script header).
It accepts 2 arguments:
- $1 is the number of character you want (MAX=77)
- $2 is the quantity of password you want (MAX=18)
If no argument is provided, after the genaration, it only asks for $1.
If argument is greater or equal 0, it takes the MAX value.
V 0.2.1
Pseudo minimalist script to send files to machine over SSH. You will need to have a SSH config file.
If you don't know what is it, checkout my example one here.
You will need to:
- edit the config file.
cp config.cfg.default config.cfg
(don't forget to edit it after the copy) - add the SCRIPTS env variable according to the script folder location. i.e:
export SCRIPTS="/home/$USER/scripts"
UPLOAD2DATA_DIST_DIR=/var/www/website/
UPLOAD2DATA_DIST_MACHINE=website
UPLOAD2DATA_STD_URL=https://data.domain.tld
A help is provided with the --help
or -h
flag.
Argument | Description |
---|---|
-h --help |
To have some help |
-c --concatenate |
Bundle the file/folder (option: tar tgz txz zip) |
-s --send |
Mandatory if you want to send a file without a tar or anything else |
-v --version |
To display the current version of the software |
Better display (into an array)- Verify is the file is alread present on the server (associated with --force argument)
- Sanitize filename (with argument, or for tarball)
Output data's URLCompress the tarballZipGzxz
Zip a directory for better compatibility- Better argument handle