about summary refs log tree commit diff
path: root/users/wpcarro
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2021-12-24T02·16-0500
committerclbot <clbot@tvl.fyi>2021-12-24T02·19+0000
commit52cd4f82fbb4fbc6660914aaebd0946591001692 (patch)
treefa4e6c90a7aeb1f67b77fd39c2542495cca962c8 /users/wpcarro
parentcdf8ed9d562ec571b8f21f7c2c50f9ae94df6bbb (diff)
refactor(wpcarro): Remove DESKTOP, LAPTOP env-var deps r/3342
Looks like symlinkManager is the only code depending on these variables, and the
dependency seems obsolete.

Change-Id: I7abe3c404ec9141f28e3eacd88388fb96ec2de88
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4548
Reviewed-by: wpcarro <wpcarro@gmail.com>
Autosubmit: wpcarro <wpcarro@gmail.com>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/wpcarro')
-rw-r--r--users/wpcarro/.envrc2
-rw-r--r--users/wpcarro/tools/symlinkManager/main.go25
2 files changed, 2 insertions, 25 deletions
diff --git a/users/wpcarro/.envrc b/users/wpcarro/.envrc
index efa3a98b3dca..196758a932f0 100644
--- a/users/wpcarro/.envrc
+++ b/users/wpcarro/.envrc
@@ -1,4 +1,2 @@
 source_up
-export DESKTOP="zeno.lon.corp.google.com";
-export LAPTOP="seneca";
 export WPCARRO="$REPO_ROOT/users/wpcarro"
diff --git a/users/wpcarro/tools/symlinkManager/main.go b/users/wpcarro/tools/symlinkManager/main.go
index e682867fb850..d99c7cb863ce 100644
--- a/users/wpcarro/tools/symlinkManager/main.go
+++ b/users/wpcarro/tools/symlinkManager/main.go
@@ -11,16 +11,10 @@ import (
 	"utils"
 )
 
-var hostnames = map[string]string{
-	os.Getenv("DESKTOP"): "desktop",
-	os.Getenv("LAPTOP"):  "work_laptop",
-}
-
 func main() {
 	audit := flag.Bool("audit", false, "Output all symlinks that would be deleted. This is the default behavior. This option is mutually exclusive with the --seriously option.")
 	seriously := flag.Bool("seriously", false, "Actually delete the symlinks. This option is mutually exclusive with the --audit option.")
 	repoName := flag.String("repo-name", "briefcase", "The name of the repository.")
-	deviceOnly := flag.Bool("device-only", false, "Only output the device-specific dotfiles.")
 	flag.Parse()
 
 	if !*audit && !*seriously {
@@ -39,23 +33,8 @@ func main() {
 			dest, err := os.Readlink(path)
 			utils.FailOn(err)
 
-			var predicate func(string) bool
-
-			if *deviceOnly {
-				predicate = func(dest string) bool {
-					var hostname string
-					hostname, err = os.Hostname()
-					utils.FailOn(err)
-					seeking, ok := hostnames[hostname]
-					if !ok {
-						log.Fatal(fmt.Sprintf("Hostname \"%s\" not supported in the hostnames map.", hostname))
-					}
-					return strings.Contains(dest, *repoName) && strings.Contains(dest, seeking)
-				}
-			} else {
-				predicate = func(dest string) bool {
-					return strings.Contains(dest, *repoName)
-				}
+			predicate := func(dest string) bool {
+				return strings.Contains(dest, *repoName)
 			}
 
 			if predicate(dest) {