mirror of
https://github.com/fontmgr/MesloLGSNF.git
synced 2025-08-15 01:32:10 +08:00
🦈🏠❗ Well I did things - Hopefully nothing breaks ❗🏠🦈
This commit is contained in:
parent
26f617acc3
commit
94499a2f02
106
install.sh
106
install.sh
@ -1,121 +1,85 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
APPNAME="MesloLGSNF"
|
||||
USER="${SUDO_USER:-${USER}}"
|
||||
HOME="${USER_HOME:-${HOME}}"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
#set opts
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# @Author : Jason
|
||||
# @Contact : casjaysdev@casjay.net
|
||||
##@Version : 020820212056-git
|
||||
# @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
|
||||
# @Created : Fr, Aug 28, 2020, 00:00 EST
|
||||
# @License : WTFPL
|
||||
# @Copyright : Copyright (c) CasjaysDev
|
||||
# @Description : installer script for MesloLGSNF font
|
||||
#
|
||||
# @Description : MesloLGSNF fonts
|
||||
# @TODO :
|
||||
# @Other :
|
||||
# @Resource :
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
# Set functions
|
||||
|
||||
SCRIPTSFUNCTURL="${SCRIPTSAPPFUNCTURL:-https://github.com/casjay-dotfiles/scripts/raw/master/functions}"
|
||||
SCRIPTSFUNCTDIR="${SCRIPTSAPPFUNCTDIR:-/usr/local/share/CasjaysDev/scripts}"
|
||||
# Import functions
|
||||
CASJAYSDEVDIR="${CASJAYSDEVDIR:-/usr/local/share/CasjaysDev/scripts}"
|
||||
SCRIPTSFUNCTDIR="${CASJAYSDEVDIR:-/usr/local/share/CasjaysDev/scripts}/functions"
|
||||
SCRIPTSFUNCTFILE="${SCRIPTSAPPFUNCTFILE:-app-installer.bash}"
|
||||
|
||||
SCRIPTSFUNCTURL="${SCRIPTSAPPFUNCTURL:-https://github.com/dfmgr/installer/raw/master/functions}"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
if [ -f "$SCRIPTSFUNCTDIR/functions/$SCRIPTSFUNCTFILE" ]; then
|
||||
. "$SCRIPTSFUNCTDIR/functions/$SCRIPTSFUNCTFILE"
|
||||
elif [ -f "$HOME/.local/share/CasjaysDev/functions/$SCRIPTSFUNCTFILE" ]; then
|
||||
. "$HOME/.local/share/CasjaysDev/functions/$SCRIPTSFUNCTFILE"
|
||||
if [ -f "$PWD/$SCRIPTSFUNCTFILE" ]; then
|
||||
. "$PWD/$SCRIPTSFUNCTFILE"
|
||||
elif [ -f "$SCRIPTSFUNCTDIR/$SCRIPTSFUNCTFILE" ]; then
|
||||
. "$SCRIPTSFUNCTDIR/$SCRIPTSFUNCTFILE"
|
||||
else
|
||||
curl -LSs "$SCRIPTSFUNCTURL/$SCRIPTSFUNCTFILE" -o "/tmp/$SCRIPTSFUNCTFILE" || exit 1
|
||||
. "/tmp/$SCRIPTSFUNCTFILE"
|
||||
echo "Can not load the functions file: $SCRIPTSFUNCTDIR/$SCRIPTSFUNCTFILE" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Call the main function
|
||||
system_installdirs
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
# Make sure the scripts repo is installed
|
||||
|
||||
scripts_check
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
# Defaults
|
||||
APPNAME="${APPNAME:-MesloLGSNF}"
|
||||
APPDIR="${APPDIR:-$SHARE/CasjaysDev/fontmgr}/$APPNAME"
|
||||
INSTDIR="${APPDIR}"
|
||||
REPO="${FONTMGRREPO:-https://github.com/fontmgr}/${APPNAME}"
|
||||
REPORAW="${REPORAW:-$REPO/raw}"
|
||||
APPVERSION="$(__appversion "$REPORAW/master/version.txt")"
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
# dfmgr_install fontmgr_install iconmgr_install pkmgr_install systemmgr_install thememgr_install wallpapermgr_install
|
||||
|
||||
# Call the fontmgr function
|
||||
fontmgr_install
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
# Script options IE: --help
|
||||
|
||||
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_dirs
|
||||
ensure_perms
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
# Main progam
|
||||
|
||||
if [ -d "$APPDIR/.git" ]; then
|
||||
execute \
|
||||
"git_update $APPDIR" \
|
||||
"Updating $APPNAME configurations"
|
||||
if __am_i_online; then
|
||||
if [ -d "$INSTDIR/.git" ]; then
|
||||
execute "git_update $INSTDIR" "Updating $APPNAME font package"
|
||||
else
|
||||
execute \
|
||||
"git_clone -q $REPO/$APPNAME $APPDIR" \
|
||||
"Installing $APPNAME configurations"
|
||||
execute "git_clone $REPO/$APPNAME $INSTDIR" "Installing $APPNAME font package"
|
||||
fi
|
||||
|
||||
# exit on fail
|
||||
failexitcode
|
||||
|
||||
failexitcode $? "Git has failed"
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
# run post install scripts
|
||||
|
||||
run_postinst() {
|
||||
fontmgr_run_post
|
||||
}
|
||||
|
||||
execute \
|
||||
"run_postinst" \
|
||||
"Running post install scripts"
|
||||
|
||||
#
|
||||
execute "run_postinst" "Running post install scripts"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
# create version file
|
||||
|
||||
fontmgr_install_version
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
# exit
|
||||
run_exit
|
||||
|
||||
# end
|
||||
|
@ -1 +1 @@
|
||||
020820211604-git
|
||||
020820212104-git
|
||||
|
Loading…
x
Reference in New Issue
Block a user