Download the shared code to its proper location rather than doing a deleteme dump. Use /sdcard/ rather than shared storage links from home directory.

This commit is contained in:
2026-05-05 09:36:29 -07:00
parent a84fba5a1c
commit fea3756a0e

View File

@@ -56,17 +56,16 @@ echo -e "\n`date` - BASH Environment"
if [[ ! -e ~/.env ]]; then
if [[ -e example.env ]]; then
mv -v example.env ~/.env
cp -v example.env ~/.env
else
echo "ERROR: Neither .env or example.env found." >&2
fi
else
echo "'.env' already exists. Good job!"
rm -v example.env
fi
if [[ -e bashrc.sh ]]; then
mv -v bashrc.sh ~/.bashrc
cp -v bashrc.sh ~/.bashrc
else
echo "ERROR: bashrc.sh not found, skipping." >&2
fi
@@ -77,31 +76,33 @@ echo -e "\n`date` - Directories"
if [[ -d ~/TRASH ]]; then
rm -rfv ~/TRASH
fi
if [[ ! -e ~/storage/shared/TRASH ]]; then
mkdir -pv ~/storage/shared/TRASH
if [[ ! -e ~/sdcard/TRASH ]]; then
mkdir -pv /sdcard/TRASH
fi
ln -s ~/storage/shared/TRASH ~/TRASH
ln -s /sdcard/TRASH ~/TRASH
if [[ ! -d ~/Code && ! -d ~/storage/shared/Code ]]; then
if [[ ! -d ~/Code && ! -d ~/sdcard/Code ]]; then
mkdir -pv ~/Code
ln -s ~/Code ~/storage/shared/Code
ln -s ~/Code /sdcard/Code
fi
echo -e "\n`date` - env-shared"
env_shared_dir="env-shared-dev-deleteme"
git clone https://git.hyperling.com/me/env-shared \
--branch=dev ~/$env_shared_dir
cp -v ~/$env_shared_dir/rc_shared.sh ~/.rc_shared
cp -v ~/$env_shared_dir/vimrc.vim ~/.vimrc
if [[ ! -d ~/bin ]]; then
env_shared_dir="$HOME/.env-shared"
if [[ ! -d "$env_shared_dir" ]]; then
echo -e "\n`date` - env-shared"
if [[ -z "$BRANCH" ]]; then
export BRANCH="dev"
fi
git clone https://git.hyperling.com/me/env-shared \
--branch=$BRANCH ~/$env_shared_dir
cp -v ~/$env_shared_dir/rc_shared.sh ~/.rc_shared
cp -v ~/$env_shared_dir/vimrc.vim ~/.vimrc
if [[ ! -d ~/bin ]]; then
mkdir -pv ~/bin
fi
cp -v ~/$env_shared_dir/bin-shared/* ~/bin/
fi
cp -v ~/$env_shared_dir/bin-shared/* ~/bin/
mv -v ~/$env_shared_dir \
~/TRASH/$env_shared_dir-"`date "+%Y%m%d-%H%M%S"`" \
| grep -v '/.git/'
echo -e "\n`date` - Cleanup"