Ok DONE
This commit is contained in:
parent
41d1ff0628
commit
fad2ddd2c3
1 changed files with 18 additions and 15 deletions
25
aps
25
aps
|
@ -8,19 +8,21 @@
|
||||||
# OHIO: it's rewritten however it has some old code from aps (v0.0.8.1)
|
# OHIO: it's rewritten however it has some old code from aps (v0.0.8.1)
|
||||||
# KEMAL: abandon all hope, ye who enter here.
|
# KEMAL: abandon all hope, ye who enter here.
|
||||||
# OHIO: ^, however my code is cleaner than the mess before.
|
# OHIO: ^, however my code is cleaner than the mess before.
|
||||||
if [ -f "$XDG_CONFIG_HOME/al/config" ]; then
|
function conf_fetch(){
|
||||||
|
if [ -f "$XDG_CONFIG_HOME/al/config" ]; then
|
||||||
. $XDG_CONFIG_HOME/al/config
|
. $XDG_CONFIG_HOME/al/config
|
||||||
elif [ -f "$HOME/.config/al/config" ]; then
|
elif [ -f "$HOME/.config/al/config" ]; then
|
||||||
. $HOME/.config/al/config
|
. $HOME/.config/al/config
|
||||||
elif [ -f "/etc/al/config" ]; then
|
elif [ -f "/etc/al/config" ]; then
|
||||||
. /etc/al/config
|
. /etc/al/config
|
||||||
elif [ -f "/etc/skel/al/config" ]; then
|
elif [ -f "/etc/skel/al/config" ]; then
|
||||||
. /etc/skel/al/config
|
. /etc/skel/al/config
|
||||||
elif [ -f $AL_CFG ]; then
|
#elif [ -f $AL_CFG ]; then
|
||||||
. $AL_CFG
|
# . $AL_CFG
|
||||||
else
|
else
|
||||||
wrn "No config file!"
|
err "No config file!"
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
case ${debug} in
|
case ${debug} in
|
||||||
on) set -x ;;
|
on) set -x ;;
|
||||||
esac
|
esac
|
||||||
|
@ -36,9 +38,10 @@ function wrn(){
|
||||||
#}
|
#}
|
||||||
function err(){
|
function err(){
|
||||||
echo -e "\e[34m==>\e[31m ERROR:\e[39m $1" &&
|
echo -e "\e[34m==>\e[31m ERROR:\e[39m $1" &&
|
||||||
rm ${lock} 2> /dev/null &&
|
rm ${lock} 2> /dev/null
|
||||||
exit 2
|
exit 2
|
||||||
}
|
}
|
||||||
|
conf_fetch
|
||||||
function notf(){
|
function notf(){
|
||||||
echo -e "\e[34m==>\e[36m NOTIFICATION:\e[39m $1"
|
echo -e "\e[34m==>\e[36m NOTIFICATION:\e[39m $1"
|
||||||
}
|
}
|
||||||
|
@ -200,7 +203,7 @@ sync_local_repo_database() {
|
||||||
git clone "${2}" "${locpkg_database}/${1}"
|
git clone "${2}" "${locpkg_database}/${1}"
|
||||||
else
|
else
|
||||||
# Local database for repo already exists - sync it
|
# Local database for repo already exists - sync it
|
||||||
cd "${locpkg_database}/${1}" || die "Could not enter local database directory. Exiting..."
|
cd "${locpkg_database}/${1}" || err "Could not enter local database directory. Exiting..."
|
||||||
git pull
|
git pull
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue