mirror of
https://github.com/rwinkhart/sshyp-labs.git
synced 2026-08-27 20:36:31 -04:00
gpgToRCW: Trim .gpg suffixes from source files (useful for Pass migrations)
This commit is contained in:
@@ -37,6 +37,7 @@ func main() {
|
||||
}
|
||||
var decLines []string
|
||||
for _, entry := range entries {
|
||||
entry = strings.TrimSuffix(entry, ".gpg")
|
||||
decLines = decryptGPG(core.TargetLocationFormat(entry))
|
||||
encBytes := wrappers.Encrypt([]byte(strings.Join(decLines, "\n")), rcwPassphrase)
|
||||
err := os.WriteFile(outputDir+strings.ReplaceAll(entry, "/", core.PathSeparator), encBytes, 0600)
|
||||
|
||||
Reference in New Issue
Block a user