summaryrefslogtreecommitdiff
path: root/scripts/vendor.sh
diff options
context:
space:
mode:
authorsrv <enmanuel.saravia.externo@pandero.com.pe>2025-04-28 17:11:28 -0500
committersrv <enmanuel.saravia.externo@pandero.com.pe>2025-04-28 17:11:28 -0500
commitf35a7b0e70032de2feec9f3bda09da44cf0e1073 (patch)
tree1e0e09581dd3707d0ceb93346452dd14451a8423 /scripts/vendor.sh
first commit
Diffstat (limited to 'scripts/vendor.sh')
-rw-r--r--scripts/vendor.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/scripts/vendor.sh b/scripts/vendor.sh
new file mode 100644
index 0000000..bb7b80f
--- /dev/null
+++ b/scripts/vendor.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+run_vendor()
+{
+
+ local LOCALDIR="${2-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}"
+ local TARGET="${LOCALDIR%/*}" # deleted slash
+ local BASE="${TARGET%scripts}" # input
+
+ if [[ -d "$BASE"/local.env/hashover-next/ ]];
+ then
+ rm -rf "$BASE"/output/hashover-next/
+ echo "$BASE"/output/ | xargs -n 1 cp -rf "$BASE"/local.env/hashover-next/
+ else
+ echo 'Not hashover'
+ fi
+
+ if [[ -f "$BASE"/local.env/.htaccess ]];
+ then
+ rm -rf "$BASE"/output/.htaccess
+ cp -rf "$BASE"/local.env/.htaccess "$BASE"/output/
+ else
+ echo 'Not exits .htaccess'
+ fi
+
+}
+
+# ==============================================================================
+# EXECUTION - START
+# ==============================================================================
+run_vendor "$@"