Skip to content

Commit

Permalink
Merge pull request #4 from vcatafesta/main
Browse files Browse the repository at this point in the history
vie 18 ago 2023 01:33:09 -04 Vilmar Catafesta ([email protected])
  • Loading branch information
vcatafesta authored Aug 18, 2023
2 parents 2d086d3 + 3bbdb17 commit 9120c26
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 5 deletions.
4 changes: 2 additions & 2 deletions usr/share/bigbashview/bcc/shell/bcclib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Description: Control Center to help usage of BigLinux
#
# Created: 2022/02/28
# Altered: 2023/08/08
# Altered: 2023/08/18
#
# Copyright (c) 2023-2023, Vilmar Catafesta <[email protected]>
# 2022-2023, Bruno Gonçalves <www.biglinux.com.br>
Expand Down Expand Up @@ -34,7 +34,7 @@
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

APP="${0##*/}"
_VERSION_="1.0.0-20230808"
_VERSION_="1.0.0-20230818"
BOOTLOG="/tmp/bigcontrolcenter-$USER-$(date +"%d%m%Y").log"
LOGGER='/dev/tty8'

Expand Down
41 changes: 38 additions & 3 deletions usr/share/bigbashview/bcc/shell/bstrlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Description: Big Store installing programs for BigLinux
#
# Created: 2023/08/11
# Altered: 2023/08/16
# Altered: 2023/08/18
#
# Copyright (c) 2023-2023, Vilmar Catafesta <[email protected]>
# All rights reserved.
Expand Down Expand Up @@ -35,6 +35,7 @@ export TEXTDOMAINDIR="/usr/share/locale"
export TEXTDOMAIN=big-store
export HOME_FOLDER="$HOME/.bigstore"
export TMP_FOLDER="/tmp/bigstore-$USER"
unset GREP_OPTIONS

function sh_update_cache_snap {
# Seleciona e cria a pasta para salvar os arquivos para cache da busca
Expand Down Expand Up @@ -87,7 +88,7 @@ function sh_update_cache_flatpak {
# Realiza a busca de pacotes Flatpak, filtra e armazena no arquivo de cache
flatpak search --arch x86_64 "" | awk -F'\t' '{ print $1"|"$2"|"$3"|"$4"|"$5"|"$6"|"}' | grep '|stable|' | sort -u > "$CACHE_FILE"

for i in $(LANG=C flatpak update | grep "^ [1-9]" | awk '{print $2}'); do
for i in $(LC_ALL=C flatpak update | grep "^ [1-9]" | awk '{print $2}'); do
sed -i "s/|${i}.*/&update|/" "$CACHE_FILE"
done

Expand Down Expand Up @@ -540,10 +541,44 @@ function sh_run_action {
}
export -f sh_run_action

function sh_reinstall_allpkg {
pacman -Sy --noconfirm - < <(pacman -Qnq)
}
export -f sh_reinstall_allpkg

function sh_pkg_pacman_build_date {
# grep "^Build Date " "${TMP_FOLDER}/pacman_pkg_cache.txt" | cut -f2 -d:
local build_date
local formatted_date

if build_date=$(grep -oP 'Build Date\s*:\s*\K.*' "${TMP_FOLDER}/pacman_pkg_cache.txt") && [[ -n "$build_date" ]] ; then
formatted_date=$(date -d "$build_date" "+%a %b %d %H:%M:%S %Y" | LC_TIME=$LANG sed 's/^\([a-zA-Z]\)/\u\1/')
echo "$formatted_date"
fi
}
export -f sh_pkg_pacman_build_date

function sh_pkg_pacman_install_date {
# grep "^Install Date " "${TMP_FOLDER}/pacman_pkg_cache.txt" | cut -f2 -d:
local install_date
local formatted_date

if install_date=$(grep -oP 'Install Date\s*:\s*\K.*' "${TMP_FOLDER}/pacman_pkg_cache.txt") && [[ -n "$install_date" ]] ; then
formatted_date=$(date -d "$install_date" "+%a %b %d %H:%M:%S %Y" | LC_TIME=$LANG sed 's/^\([a-zA-Z]\)/\u\1/')
echo "$formatted_date"
fi
}
export -f sh_pkg_pacman_install_date

function sh_pkg_pacman_install_reason {
grep "^Install Reason " "${TMP_FOLDER}/pacman_pkg_cache.txt" | cut -f2 -d:
}
export -f sh_pkg_pacman_install_reason

function sh_main {
local execute_app="$1"
eval "$execute_app"
return
# return
}

#sh_debug
Expand Down

0 comments on commit 9120c26

Please sign in to comment.