Merge "TBR: Revert "jiri: Copy scripts/jiri to JIRI_ROOT/.jiri_root/scripts/jiri when updating""
diff --git a/jiri/.api b/jiri/.api
index 2358c18..8b75c99 100644
--- a/jiri/.api
+++ b/jiri/.api
@@ -17,7 +17,6 @@
 pkg jiri, method (*X) ProfilesDBDir() string
 pkg jiri, method (*X) ResolveManifestPath(string) (string, error)
 pkg jiri, method (*X) RootMetaDir() string
-pkg jiri, method (*X) ScriptsDir() string
 pkg jiri, method (*X) UpdateHistoryDir() string
 pkg jiri, method (*X) UpdateHistoryLatestLink() string
 pkg jiri, method (*X) UpdateHistorySecondLatestLink() string
diff --git a/jiri/x.go b/jiri/x.go
index abe6b31..09087b5 100644
--- a/jiri/x.go
+++ b/jiri/x.go
@@ -147,11 +147,6 @@
 	return filepath.Join(x.RootMetaDir(), "bin")
 }
 
-// ScriptsDir returns the path to the scripts directory.
-func (x *X) ScriptsDir() string {
-	return filepath.Join(x.RootMetaDir(), "scripts")
-}
-
 // UpdateHistoryDir returns the path to the update history directory.
 func (x *X) UpdateHistoryDir() string {
 	return filepath.Join(x.RootMetaDir(), "update_history")
diff --git a/project/project.go b/project/project.go
index 2f0ebfe..0a59d01 100644
--- a/project/project.go
+++ b/project/project.go
@@ -1000,17 +1000,7 @@
 		return err
 	}
 	// 3. Install the tools into $JIRI_ROOT/.jiri_root/bin.
-	if err := InstallTools(jirix, tmpToolsDir); err != nil {
-		return err
-	}
-	// 4. If we have the jiri project, then update the jiri script in
-	// $JIRI_ROOT/.jiri_root/scripts.
-	jiriProject, err := remoteProjects.FindUnique(JiriProject)
-	if err != nil {
-		// jiri project not found.  This happens often in tests.  Ok to ignore.
-		return nil
-	}
-	return updateJiriScript(jirix, jiriProject)
+	return InstallTools(jirix, tmpToolsDir)
 }
 
 // WriteUpdateHistorySnapshot creates a snapshot of the current state of all
@@ -1357,31 +1347,6 @@
 	return nil
 }
 
-// updateJiriScript copies the scripts/jiri script from the jiri repo to
-// JIRI_ROOT/.jiri_root/scripts/jiri.
-func updateJiriScript(jirix *jiri.X, jiriProject Project) error {
-	s := jirix.NewSeq()
-	updateFn := func() error {
-		return ApplyToLocalMaster(jirix, Projects{jiriProject.Key(): jiriProject}, func() error {
-			newJiriScriptPath := filepath.Join(jiriProject.Path, "scripts", "jiri")
-			newJiriScript, err := s.Open(newJiriScriptPath)
-			if err != nil {
-				return err
-			}
-			jiriScriptOutPath := filepath.Join(jirix.ScriptsDir(), "jiri")
-			jiriScriptOut, err := s.Create(jiriScriptOutPath)
-			if err != nil {
-				return err
-			}
-			if _, err := s.Copy(jiriScriptOut, newJiriScript); err != nil {
-				return err
-			}
-			return nil
-		})
-	}
-	return jirix.NewSeq().Verbose(true).Call(updateFn, "update jiri script").Done()
-}
-
 // TransitionBinDir handles the transition from the old location
 // $JIRI_ROOT/devtools/bin to the new $JIRI_ROOT/.jiri_root/bin.  In
 // InstallTools above we've already installed the tools to the new location.