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