aboutsummaryrefslogtreecommitdiff
path: root/cmd/pkg-set.sh
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/pkg-set.sh')
-rwxr-xr-xcmd/pkg-set.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/cmd/pkg-set.sh b/cmd/pkg-set.sh
new file mode 100755
index 0000000..058a7b7
--- /dev/null
+++ b/cmd/pkg-set.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+TARGET="$(pwd)"
+if [ $# -eq 1 ]; then
+ TARGET=$1
+fi
+
+# check file path
+PKG_SET=$(pwd | \
+ awk -F '/source/' '{print $2}' | \
+ awk -F '/' '{print $1}'
+)
+
+echo "$PKG_SET"