themepack2txz - Extrair arquivos themepack e criar um pacote TXZ com as imagens
Publicado por Mauricio Ferrari (LinuxProativo) (última atualização em 29/08/2020)
[ Hits: 1.425 ]
Homepage: https://www.youtube.com/@LinuxProativo
Esse script faz basicamente o seguinte, ele extrai um Arquivo de Temas do Windows e usa as imagens extraídas para criar um pacote TXZ para o Slackware Current, para instalar em /usr/share/backgrounds.
Ele foi feito para ser usado no Slackware Current e usa o makepkg para gerar o pacote corretamente.
#!/bin/bash
#
# themepack2txz - Versão 1.0
#
# By Mauricio Ferrari
#
# Data: 26/08/2020
#
# Requer o cabextract instalado.
#
LOCALDIR=$(pwd)
ARCH=$(uname -m)
VERSION=${VERSION:-1.0}
BUILD=${BUILD:-1}
noroot(){
echo
echo ' _ _ ____ _ _ '
echo '| \ | | ___ | _ \ ___ ___ | |_ | |'
echo '| \| |/ _ \ | |_) / _ \ / _ \| __| | |'
echo '| |\ | (_) | | _ < (_) | (_) | |_ |_|'
echo '|_| \_|\___/ |_| \_\___/ \___/ \__| (_)'
echo
echo
exit
}
info(){
echo
echo "$0"
echo
echo "Uso: themepack2txz theme.themepack"
echo
exit
}
slackdescgen(){
echo "# HOW TO EDIT THIS FILE:
# The 'handy ruler' below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|' on
# the right side marks the last column you can put a character in. You must make
# exactly 11 lines for the formatting to be correct. It's also customary to
# leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
themtxz:
themtxz: Created By themepack2txz
themtxz:
themtxz:
themtxz:
themtxz:
themtxz:
themtxz:
themtxz:
themtxz:
themtxz:"| tee /tmp/$FOLDER/install/slackdesc > /dev/null
}
createtxz(){
cd /tmp/$FOLDER/
makepkg -c n $LOCALDIR/$FOLDER-$VERSION-$ARCH-$BUILD.txz
}
[[ `id -u` != 0 ]] && noroot
[[ "$1" = "" ]] && info
for FILE in $* ; do
FOLDER=$( ls $FILE | cut -d '.' -f1 )
mkdir -p tmp /tmp/$FOLDER/install /tmp/$FOLDER/usr/share/backgrounds/$FOLDER
cabextract -d tmp $FILE
mv tmp/D*/* /tmp/$FOLDER/usr/share/backgrounds/$FOLDER
slackdescgen && createtxz
cd $LOCALDIR
rm -r tmp /tmp/$FOLDER
exit 0
done
Calcula período entre data inicial e data final
Pegar MAC através do IP na rede interna
Faça download de vídeos do YouTube, convertendo para MPEG
Dump de várias tabelas do MYSQL em vários arquivos
Nenhum comentário foi encontrado.
Gentoo binário em 2026: UEFI, LUKS, Btrfs e Systemd
Trabalhando Nativamente com Logs no Linux
Jogando Daikatana (Steam) com Patch 1.3 via Luxtorpeda no Linux
LazyDocker – Interface de Usuário em Tempo Real para o Docker
Por que sua empresa precisa de uma PKI (e como automatizar EMISSÕES de certificados via Web API)
Instalando NoMachine no Gentoo com Systemd (acesso Remoto em LAN)
Gentoo: Trocando wpa_supplicant pelo iwd no NetworkManager (Systemd)
O que houve com slackware ??? (10)
O Free Download Manager não abre no Fedora 43 KDE Plasma (2)
Permissão acesso as pastas servidor Ubuntu Server 24.04 (5)









