chore: add current provisioning state before migration
This commit is contained in:
parent
a9703b4748
commit
50745b0f22
660 changed files with 88126 additions and 0 deletions
41
distro/copy_installer
Normal file
41
distro/copy_installer
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
# Info: Installation for Provisioning
|
||||
# Author: JesusPerezLorenzo
|
||||
# Release: 1.0.2
|
||||
# Date: 14-11-2023
|
||||
|
||||
set +o errexit
|
||||
set +o pipefail
|
||||
|
||||
INSTALL_PATH=${1:-/usr/local}
|
||||
PACK_SET_ENV_LIST="core/bin/provisioning core/lib-providers/common"
|
||||
|
||||
[ ! -d "provisioning" ] && echo "provisioning path not found" && exit 1
|
||||
[[ "$INSTALL_PATH" != /* ]] && INSTALL_PATH=$(pwd)/$INSTALL_PATH
|
||||
if [ -d "$INSTALL_PATH/provisioning" ] ;then
|
||||
echo "Remove previous installation ... "
|
||||
sudo rm -rf "$INSTALL_PATH/provisioning"
|
||||
fi
|
||||
if [ -n "$1" ] ; then
|
||||
for file in $PACK_SET_ENV_LIST
|
||||
do
|
||||
case "$(uname)" in
|
||||
Darwin) sed "s,/usr/local/,$INSTALL_PATH/,g" <"provisioning/$file" > /tmp/provisioning.$$
|
||||
mv /tmp/provisioning.$$ "provisioning/$file"
|
||||
;;
|
||||
Linux) sed -i'' "s,/usr/local/,$INSTALL_PATH/,g" "provisioning/$file"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
chmod +x provisioning/core/bin/provisioning
|
||||
fi
|
||||
[ ! -d "$INSTALL_PATH" ] && sudo mkdir -p "$INSTALL_PATH"
|
||||
sudo mv provisioning "$INSTALL_PATH" &&
|
||||
rm -f install-provisioning &&
|
||||
sudo rm -f /usr/local/bin/provisioning &&
|
||||
sudo ln -s "$INSTALL_PATH"/provisioning/core/bin/provisioning /usr/local/bin
|
||||
echo "
|
||||
✅ Installation complete in $INSTALL_PATH.
|
||||
Use command 'provisioning -h' for help
|
||||
Thanks for install PROVISIONING
|
||||
"
|
||||
Loading…
Add table
Add a link
Reference in a new issue