⚠️ Disable Docker Desktop resource saver due to instability
Easily manage your WSL environment with a handful of generic commands.
Applications are seperated into modules.
Remote repository is cloned into distro if specified (-r
).
./rwsl init -d "Ubuntu-18.04" -m "generic" # -d:Distro, -m:Module, -u:User, -r:Repo
or
./rwsl init $(cat defaults/generic.sh)
Place .pgp
& .gitconfig
files into the etc/
directory (ignored by git).
Example .gitconfig
:
[core]
editor = "vim"
[user]
name = First Last
email = my@email.com
signingKey = xxx
[commit]
gpgSign = True
How to import pgp files from keybase.io:
keybase pgp export -q xxx > etc/public.pgp
keybase pgp export -q xxx --secret > etc/private.pgp
For GitHub authorization, add GitHub personal access token file git.token
to etc/
.
init
(Re)initialize env.status
Status of env.backup
Backup env to.tar
file.down
Shutdown env.up
Bring env up after shutdown.destroy
Destroy env.restore
Restore env from.tar
file.test
Run module specific env tests.fix
Run module specific env fixes.
The following scripts can be run in various order, but some run orders are not compatible (e.g. destroy then test):
d="Ubuntu"; # Distro name
m="generic"; # Module name
./rwsl init -d $d -m $m;
./rwsl status -d $d -m $m;
./rwsl backup -d $d -m $m;
./rwsl down -d $d -m $m;
./rwsl up -d $d -m $m;
./rwsl destroy -d $d -m $m;
./rwsl restore -d $d -m $m;
./rwsl test -d $d -m $m;
Mandatory:
-d
,--distro
VAL Distro name (reference: wsl --list --online)-m
,--module
VAL Application name
Optional:
-u
,--user
VAL username-r
,--repo
VAL Repository url-h
,--help
Prints this help
Examples:
./rwsl [COMMAND] -d VAL -m VAL -u VAL
./rwsl init -d 'Ubuntu-18.04' -m 'generic' -u 'user3' -r 'https://github.com/JosiahSiegel/rapid-wsl.git'
Quick re-use arguments:
- Create
defaults/my_args.sh
file-d Ubuntu-20.04 -m generic -u user3
- Run script using default file
./rwsl init $(cat defaults/my_args.sh)
Currently, only tested using Git Bash via Windows Terminal.