🦈🏠 Well I did things - Hopefully nothing breaks 🏠🦈

This commit is contained in:
Jason 2021-02-08 21:04:09 -05:00 committed by casjay
parent 26f617acc3
commit 94499a2f02
No known key found for this signature in database
GPG Key ID: 4F765975C1F0EE5F
2 changed files with 39 additions and 75 deletions

View File

@ -1,121 +1,85 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
APPNAME="MesloLGSNF" APPNAME="MesloLGSNF"
USER="${SUDO_USER:-${USER}}" USER="${SUDO_USER:-${USER}}"
HOME="${USER_HOME:-${HOME}}" HOME="${USER_HOME:-${HOME}}"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#set opts
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# @Author : Jason ##@Version : 020820212056-git
# @Contact : casjaysdev@casjay.net # @Author : Jason Hempstead
# @Contact : jason@casjaysdev.com
# @License : WTFPL.md
# @ReadME : README.md
# @Copyright : Copyright: (c) 2021 Jason Hempstead, CasjaysDev
# @Created : Monday, Feb 08, 2021 20:56 EST
# @File : install.sh # @File : install.sh
# @Created : Fr, Aug 28, 2020, 00:00 EST # @Description : MesloLGSNF fonts
# @License : WTFPL # @TODO :
# @Copyright : Copyright (c) CasjaysDev # @Other :
# @Description : installer script for MesloLGSNF font # @Resource :
#
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Import functions
# Set functions CASJAYSDEVDIR="${CASJAYSDEVDIR:-/usr/local/share/CasjaysDev/scripts}"
SCRIPTSFUNCTDIR="${CASJAYSDEVDIR:-/usr/local/share/CasjaysDev/scripts}/functions"
SCRIPTSFUNCTURL="${SCRIPTSAPPFUNCTURL:-https://github.com/casjay-dotfiles/scripts/raw/master/functions}"
SCRIPTSFUNCTDIR="${SCRIPTSAPPFUNCTDIR:-/usr/local/share/CasjaysDev/scripts}"
SCRIPTSFUNCTFILE="${SCRIPTSAPPFUNCTFILE:-app-installer.bash}" SCRIPTSFUNCTFILE="${SCRIPTSAPPFUNCTFILE:-app-installer.bash}"
SCRIPTSFUNCTURL="${SCRIPTSAPPFUNCTURL:-https://github.com/dfmgr/installer/raw/master/functions}"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if [ -f "$PWD/$SCRIPTSFUNCTFILE" ]; then
if [ -f "$SCRIPTSFUNCTDIR/functions/$SCRIPTSFUNCTFILE" ]; then . "$PWD/$SCRIPTSFUNCTFILE"
. "$SCRIPTSFUNCTDIR/functions/$SCRIPTSFUNCTFILE" elif [ -f "$SCRIPTSFUNCTDIR/$SCRIPTSFUNCTFILE" ]; then
elif [ -f "$HOME/.local/share/CasjaysDev/functions/$SCRIPTSFUNCTFILE" ]; then . "$SCRIPTSFUNCTDIR/$SCRIPTSFUNCTFILE"
. "$HOME/.local/share/CasjaysDev/functions/$SCRIPTSFUNCTFILE"
else else
curl -LSs "$SCRIPTSFUNCTURL/$SCRIPTSFUNCTFILE" -o "/tmp/$SCRIPTSFUNCTFILE" || exit 1 echo "Can not load the functions file: $SCRIPTSFUNCTDIR/$SCRIPTSFUNCTFILE" 1>&2
. "/tmp/$SCRIPTSFUNCTFILE" exit 1
fi fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Call the main function
system_installdirs system_installdirs
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Make sure the scripts repo is installed # Make sure the scripts repo is installed
scripts_check scripts_check
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Defaults # Defaults
APPNAME="${APPNAME:-MesloLGSNF}" APPNAME="${APPNAME:-MesloLGSNF}"
APPDIR="${APPDIR:-$SHARE/CasjaysDev/fontmgr}/$APPNAME" APPDIR="${APPDIR:-$SHARE/CasjaysDev/fontmgr}/$APPNAME"
INSTDIR="${APPDIR}"
REPO="${FONTMGRREPO:-https://github.com/fontmgr}/${APPNAME}" REPO="${FONTMGRREPO:-https://github.com/fontmgr}/${APPNAME}"
REPORAW="${REPORAW:-$REPO/raw}" REPORAW="${REPORAW:-$REPO/raw}"
APPVERSION="$(__appversion "$REPORAW/master/version.txt")" APPVERSION="$(__appversion "$REPORAW/master/version.txt")"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Call the fontmgr function
# dfmgr_install fontmgr_install iconmgr_install pkmgr_install systemmgr_install thememgr_install wallpapermgr_install
fontmgr_install fontmgr_install
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Script options IE: --help # Script options IE: --help
show_optvars "$@" show_optvars "$@"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# end with a space
APP=""
# install packages - useful for package that have the same name on all oses
install_packages $APP
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Ensure directories exist # Ensure directories exist
ensure_dirs ensure_dirs
ensure_perms ensure_perms
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Main progam # Main progam
if __am_i_online; then
if [ -d "$APPDIR/.git" ]; then if [ -d "$INSTDIR/.git" ]; then
execute \ execute "git_update $INSTDIR" "Updating $APPNAME font package"
"git_update $APPDIR" \
"Updating $APPNAME configurations"
else else
execute \ execute "git_clone $REPO/$APPNAME $INSTDIR" "Installing $APPNAME font package"
"git_clone -q $REPO/$APPNAME $APPDIR" \
"Installing $APPNAME configurations"
fi fi
# exit on fail # exit on fail
failexitcode failexitcode $? "Git has failed"
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# run post install scripts # run post install scripts
run_postinst() { run_postinst() {
fontmgr_run_post fontmgr_run_post
} }
#
execute \ execute "run_postinst" "Running post install scripts"
"run_postinst" \
"Running post install scripts"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# create version file # create version file
fontmgr_install_version fontmgr_install_version
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# exit # exit
run_exit run_exit
# end # end

View File

@ -1 +1 @@
020820211604-git 020820212104-git