Files
madumlao-profile/install.sh

28 lines
661 B
Bash
Executable File

#!/bin/bash
if ! [ -t 0 ]; then
echo "exec from pipe"
DOWNLOAD_APP=y
APP_DIR="$HOME/.local/share/madumlao-profile"
else
DOWNLOAD_APP=
APP_DIR="$(dirname "$0")"
fi
if [ "$DOWNLOAD_APP" ]; then
echo "Downloading master copy"
PARENT_DIR="$(dirname "$APP_DIR")"
mkdir -pv "$PARENT_DIR"
if [ -x git ]; then
cd "$PARENT_DIR"
git clone https://gitlab.com/madumlao/madumlao-profile
else
curl -O https://gitlab.com/madumlao/madumlao-profile/-/archive/master/madumlao-profile-master.tar.gz
tar -zxf madumlao-profile-master.tar.gz -C "$PARENT_DIR"
fi
fi
echo "Set pwd to $APP_DIR"
cd "$APP_DIR"
APP_DIR="$(pwd)"
./install-ubuntu.sh