aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2019-12-13 14:40:19 +0100
committerInigoGutierrez <inigogf.95@gmail.com>2019-12-13 14:40:19 +0100
commita55fd95dd46584fa224fe25b248373c78bc65638 (patch)
tree459cdbfc9c5cbd37ba2c90500ac64556d4caca1b
parentbeb5300400a76b385b83f91384a0e75beccccf7a (diff)
downloadscripts-a55fd95dd46584fa224fe25b248373c78bc65638.tar.gz
scripts-a55fd95dd46584fa224fe25b248373c78bc65638.zip
Created ides.sh: sets up dev. envs. (or selects a script to exec. from a specific folder)
-rwxr-xr-xides.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/ides.sh b/ides.sh
new file mode 100755
index 0000000..4a24a3e
--- /dev/null
+++ b/ides.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# ides.sh
+#
+# Usage: ides.sh
+#
+# Sets up a working environment (actually just selects from a list of scripts
+# in a specific folder and executes one of them)
+
+idesFolder="$HOME/.config/ides"
+files="$(find "$idesFolder" | grep '\.sh$')"
+names="$(echo "$files" | sed 's|^.*/||; s|\.sh$||')"
+selectedName="$(echo "$names" | fzf)" || exit 0
+selectedFile="$(echo "$files" | grep -E "${selectedName}(.sh)?$" )"
+
+"$selectedFile"