From: Amit Vadhavana <av2082000@gmail.com>
To: todd.e.brandt@linux.intel.com, skhan@linuxfoundation.org,
ricardo@marliere.net
Cc: av2082000@gmail.com, linux-kernel-mentees@lists.linux.dev,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] pm-graph: Refactor installation script
Date: Fri, 1 Nov 2024 20:22:41 +0530 [thread overview]
Message-ID: <20241101145241.10326-1-av2082000@gmail.com> (raw)
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
next reply other threads:[~2024-11-01 14:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-01 14:52 Amit Vadhavana [this message]
2024-11-04 16:20 ` [PATCH] pm-graph: Refactor installation script Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241101145241.10326-1-av2082000@gmail.com \
--to=av2082000@gmail.com \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=ricardo@marliere.net \
--cc=skhan@linuxfoundation.org \
--cc=todd.e.brandt@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox