The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] pm-graph: Refactor installation script
@ 2024-11-01 14:52 Amit Vadhavana
  2024-11-04 16:20 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Amit Vadhavana @ 2024-11-01 14:52 UTC (permalink / raw)
  To: todd.e.brandt, skhan, ricardo
  Cc: av2082000, linux-kernel-mentees, linux-pm, linux-kernel

Change installation script to ensure that the terminal returns to the
original directory after the installation process completes.

Signed-off-by: Amit Vadhavana <av2082000@gmail.com>
---
 tools/power/pm-graph/install_latest_from_github.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/power/pm-graph/install_latest_from_github.sh b/tools/power/pm-graph/install_latest_from_github.sh
index eaa332399d36..aaf3515400ed 100755
--- a/tools/power/pm-graph/install_latest_from_github.sh
+++ b/tools/power/pm-graph/install_latest_from_github.sh
@@ -4,6 +4,9 @@
 # Script which clones and installs the latest pm-graph
 # from http://github.com/intel/pm-graph.git
 
+# Save the current directory
+CURRENT_DIR=$(pwd)
+
 OUT=`mktemp -d 2>/dev/null`
 if [ -z "$OUT" -o ! -e $OUT ]; then
 	echo "ERROR: mktemp failed to create folder"
@@ -36,3 +39,6 @@ else
 	echo "INSTALL FAILED"
 fi
 cleanup
+
+# Return to the original directory
+cd "$CURRENT_DIR"
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-11-04 16:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-01 14:52 [PATCH] pm-graph: Refactor installation script Amit Vadhavana
2024-11-04 16:20 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox