Update file Taskfile.yml

This commit is contained in:
Brian Zalewski 2023-04-16 00:43:11 +00:00
parent 68b5742068
commit 973f3dd7d4

View file

@ -41,6 +41,7 @@ tasks:
printf '%s' "$(echo "$selected" | jq -r '.login.password')" | $COPY printf '%s' "$(echo "$selected" | jq -r '.login.password')" | $COPY
brave:profile:backup: brave:profile:backup:
desc: Backs up the user's {{ .AppName }} profile to the user's S3-backed Restic repository
vars: vars:
AppName: Brave Browser AppName: Brave Browser
RcloneRepository: brave RcloneRepository: brave
@ -65,6 +66,22 @@ tasks:
RcloneRepository: brave RcloneRepository: brave
brave:profile:restore: brave:profile:restore:
desc: Restores the user's {{ .AppName }} profile from the user's S3-backed Restic repository
vars:
AppName: Brave Browser
RcloneRepository: brave
summary: |
# {{ .AppName }} Profile Import / Restore
This command imports / restores the {{ .AppName }} profile from the S3 Restic repository, if it exists. In order to use this
command for the first time, you should initialize {{ .AppName }} by opening the application. You should also customize
the application by applying your preferred settings (i.e. customize it how you want it to open in the future). Then, after making
any changes you wish to be saved, you can backup the {{ .AppName }} profile to the user's S3 bucket
by running the `{{ .RcloneRepository }}:profile:backup` task. After this is done, you can restore the application
settings by running this command (i.e. `{{ .RcloneRepository }}:profile:restore`).
The {{ .AppName }} backup is encrypted with the same key that Chezmoi uses (stored in `~/.config/age/chezmoi.txt`, by default).
Since the backup leverages Restic, you can leverage all the functionality that Restic offers if something goes awry.
cmds: cmds:
- task: profile:restore - task: profile:restore
vars: vars:
@ -74,8 +91,9 @@ tasks:
RcloneRepository: brave RcloneRepository: brave
chrome:profile:backup: chrome:profile:backup:
desc: Backs up the user's {{ .AppName }} profile to the user's S3-backed Restic repository
vars: vars:
AppName: Chrome AppName: Google Chrome
RcloneRepository: chrome RcloneRepository: chrome
summary: | summary: |
# {{ .AppName }} Profile Backup # {{ .AppName }} Profile Backup
@ -93,11 +111,27 @@ tasks:
cmds: cmds:
- task: profile:backup - task: profile:backup
vars: vars:
AppName: Chrome AppName: Google Chrome
ProfileFolder: ~/Library/Application Support/Google/Chrome/Default ProfileFolder: ~/Library/Application Support/Google/Chrome/Default
RcloneRepository: chrome RcloneRepository: chrome
chrome:profile:restore: chrome:profile:restore:
desc: Restores the user's {{ .AppName }} profile from the user's S3-backed Restic repository
vars:
AppName: Google Chrome
RcloneRepository: chrome
summary: |
# {{ .AppName }} Profile Import / Restore
This command imports / restores the {{ .AppName }} profile from the S3 Restic repository, if it exists. In order to use this
command for the first time, you should initialize {{ .AppName }} by opening the application. You should also customize
the application by applying your preferred settings (i.e. customize it how you want it to open in the future). Then, after making
any changes you wish to be saved, you can backup the {{ .AppName }} profile to the user's S3 bucket
by running the `{{ .RcloneRepository }}:profile:backup` task. After this is done, you can restore the application
settings by running this command (i.e. `{{ .RcloneRepository }}:profile:restore`).
The {{ .AppName }} backup is encrypted with the same key that Chezmoi uses (stored in `~/.config/age/chezmoi.txt`, by default).
Since the backup leverages Restic, you can leverage all the functionality that Restic offers if something goes awry.
cmds: cmds:
- task: profile:restore - task: profile:restore
vars: vars:
@ -107,6 +141,7 @@ tasks:
RcloneRepository: chrome RcloneRepository: chrome
edge:profile:backup: edge:profile:backup:
desc: Backs up the user's {{ .AppName }} profile to the user's S3-backed Restic repository
vars: vars:
AppName: Microsoft Edge AppName: Microsoft Edge
RcloneRepository: edge RcloneRepository: edge
@ -131,6 +166,22 @@ tasks:
RcloneRepository: edge RcloneRepository: edge
edge:profile:restore: edge:profile:restore:
desc: Restores the user's {{ .AppName }} profile from the user's S3-backed Restic repository
vars:
AppName: Microsoft Edge
RcloneRepository: edge
summary: |
# {{ .AppName }} Profile Import / Restore
This command imports / restores the {{ .AppName }} profile from the S3 Restic repository, if it exists. In order to use this
command for the first time, you should initialize {{ .AppName }} by opening the application. You should also customize
the application by applying your preferred settings (i.e. customize it how you want it to open in the future). Then, after making
any changes you wish to be saved, you can backup the {{ .AppName }} profile to the user's S3 bucket
by running the `{{ .RcloneRepository }}:profile:backup` task. After this is done, you can restore the application
settings by running this command (i.e. `{{ .RcloneRepository }}:profile:restore`).
The {{ .AppName }} backup is encrypted with the same key that Chezmoi uses (stored in `~/.config/age/chezmoi.txt`, by default).
Since the backup leverages Restic, you can leverage all the functionality that Restic offers if something goes awry.
cmds: cmds:
- task: profile:restore - task: profile:restore
vars: vars:
@ -140,7 +191,7 @@ tasks:
RcloneRepository: edge RcloneRepository: edge
ferdium:profile:backup: ferdium:profile:backup:
desc: Imports the user's Ferdium profile from the CloudFlare R2 Restic repository for Ferdium desc: Backs up the user's {{ .AppName }} profile to the user's S3-backed Restic repository
vars: vars:
AppName: Ferdium AppName: Ferdium
RcloneRepository: ferdium RcloneRepository: ferdium
@ -165,17 +216,22 @@ tasks:
RcloneRepository: ferdium RcloneRepository: ferdium
ferdium:profile:restore: ferdium:profile:restore:
desc: Imports the user's Ferdium profile from the CloudFlare R2 Restic repository for Ferdium desc: Restores the user's {{ .AppName }} profile from the user's S3-backed Restic repository
vars:
AppName: Ferdium
RcloneRepository: ferdium
summary: | summary: |
# Ferdium Profile Import # {{ .AppName }} Profile Import / Restore
This command imports the Ferdium profile from the Restic repository if it exists. In order to use this This command imports / restores the {{ .AppName }} profile from the S3 Restic repository, if it exists. In order to use this
command for the first time, you should initialize Ferdium by opening the application. Then, after making command for the first time, you should initialize {{ .AppName }} by opening the application. You should also customize
any changes you wish to be saved, you should backup the Ferdium profile to the CloudFlare R2 user bucket the application by applying your preferred settings (i.e. customize it how you want it to open in the future). Then, after making
by running the `ferdium:profile:import` task first. any changes you wish to be saved, you can backup the {{ .AppName }} profile to the user's S3 bucket
by running the `{{ .RcloneRepository }}:profile:backup` task. After this is done, you can restore the application
settings by running this command (i.e. `{{ .RcloneRepository }}:profile:restore`).
The Ferdium backup is encrypted with the same key that Chezmoi uses (stored in `~/.config/age/chezmoi.txt`, by default). The {{ .AppName }} backup is encrypted with the same key that Chezmoi uses (stored in `~/.config/age/chezmoi.txt`, by default).
The backup uses Restic so all the functionality that Restic offers is available with backups made by this command. Since the backup leverages Restic, you can leverage all the functionality that Restic offers if something goes awry.
cmds: cmds:
- task: profile:restore - task: profile:restore
vars: vars:
@ -185,6 +241,7 @@ tasks:
RcloneRepository: ferdium RcloneRepository: ferdium
firefox:profile:backup: firefox:profile:backup:
desc: Backs up the user's {{ .AppName }} profile to the user's S3-backed Restic repository
vars: vars:
AppName: Firefox AppName: Firefox
RcloneRepository: firefox RcloneRepository: firefox
@ -209,7 +266,23 @@ tasks:
RcloneRepository: firefox RcloneRepository: firefox
firefox:profile:restore: firefox:profile:restore:
cmds: desc: Restores the user's {{ .AppName }} profile from the user's S3-backed Restic repository
vars:
AppName: Firefox
RcloneRepository: firefox
summary: |
# {{ .AppName }} Profile Import / Restore
This command imports / restores the {{ .AppName }} profile from the S3 Restic repository, if it exists. In order to use this
command for the first time, you should initialize {{ .AppName }} by opening the application. You should also customize
the application by applying your preferred settings (i.e. customize it how you want it to open in the future). Then, after making
any changes you wish to be saved, you can backup the {{ .AppName }} profile to the user's S3 bucket
by running the `{{ .RcloneRepository }}:profile:backup` task. After this is done, you can restore the application
settings by running this command (i.e. `{{ .RcloneRepository }}:profile:restore`).
The {{ .AppName }} backup is encrypted with the same key that Chezmoi uses (stored in `~/.config/age/chezmoi.txt`, by default).
Since the backup leverages Restic, you can leverage all the functionality that Restic offers if something goes awry.
cmds:
- task: profile:restore - task: profile:restore
vars: vars:
AppFolder: /Applications/Firefox.app AppFolder: /Applications/Firefox.app
@ -228,6 +301,7 @@ tasks:
echo -e " \e[9mStrikethrough\e[0m" echo -e " \e[9mStrikethrough\e[0m"
librewolf:profile:backup: librewolf:profile:backup:
desc: Backs up the user's {{ .AppName }} profile to the user's S3-backed Restic repository
vars: vars:
AppName: LibreWolf AppName: LibreWolf
RcloneRepository: librewolf RcloneRepository: librewolf
@ -252,6 +326,22 @@ tasks:
RcloneRepository: librewolf RcloneRepository: librewolf
librewolf:profile:restore: librewolf:profile:restore:
desc: Restores the user's {{ .AppName }} profile from the user's S3-backed Restic repository
vars:
AppName: LibreWolf
RcloneRepository: librewolf
summary: |
# {{ .AppName }} Profile Import / Restore
This command imports / restores the {{ .AppName }} profile from the S3 Restic repository, if it exists. In order to use this
command for the first time, you should initialize {{ .AppName }} by opening the application. You should also customize
the application by applying your preferred settings (i.e. customize it how you want it to open in the future). Then, after making
any changes you wish to be saved, you can backup the {{ .AppName }} profile to the user's S3 bucket
by running the `{{ .RcloneRepository }}:profile:backup` task. After this is done, you can restore the application
settings by running this command (i.e. `{{ .RcloneRepository }}:profile:restore`).
The {{ .AppName }} backup is encrypted with the same key that Chezmoi uses (stored in `~/.config/age/chezmoi.txt`, by default).
Since the backup leverages Restic, you can leverage all the functionality that Restic offers if something goes awry.
cmds: cmds:
- task: profile:restore - task: profile:restore
vars: vars:
@ -313,6 +403,10 @@ tasks:
``` ```
find . -type l -exec 'run squash-symlink --' {} + find . -type l -exec 'run squash-symlink --' {} +
``` ```
## TODO
Test and fix this so it can be accessed by `run squash-symlink -- $PATH`
cmds: cmds:
- | - |
set -e set -e