#!/bin/bash # Import BigControlCenter base modules / Importa os módulos básicos do BigControlCenter # That's include jquery and materialize / Isso inclui o jquery e o materialize # http://materializecss.com/ . /usr/share/bigbashview/bcc/shell/base.sh windowID="$(xprop -root '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)" #Title/Description variables bcc_title="Gerador de ISOs do BigLinux" bcc_description=$"Crie seu remaster personalizado de forma bastante simples." # To disable logo use: bcc_logo="no" bcc_logo="logo.png" # About variables # To disable about use: bcc_about="no" bcc_about="yes" bcc_about_license=$"GPL v2 or greater" bcc_about_by=$"Bruno Gonçalves" bcc_about_release_date=$"26/08/2016" bcc_about_url_code=$"https://github.com/biglinux/big-remaster" bcc_about_url_project=$"https://www.biglinux.com.br" # Print header in screen bcc_header # Import tweaks for theme echo '' ############# # Check for create new folder ############# cd "/usr/share/bigbashview/bcc/apps/bigremaster/config" if [ "$p_folder" = "new_folder" ]; then zenity --attach="$windowID" --file-selection --directory --filename=/home/ > /usr/share/bigbashview/bcc/apps/bigremaster/temp/folder.txt # Check if folder is empty if [ "$(ls "$(cat /usr/share/bigbashview/bcc/apps/bigremaster/temp/folder.txt)" | wc -c)" != "0" ]; then if [ ! -e "$(cat /usr/share/bigbashview/bcc/apps/bigremaster/temp/folder.txt)/install-apps.txt" ]; then echo '' echo '' exit fi fi # Check if folder used for another remaster if [ "$(grep -R "$(cat /usr/share/bigbashview/bcc/apps/bigremaster/temp/folder.txt)$" /usr/share/bigbashview/bcc/apps/bigremaster/config | cut -f1 -d= | cut -f1 -d:)" != "" ]; then echo '' echo '' exit fi # Create new id for new remaster check_exist=yes file_exist=0 while [ $check_exist = yes ]; do if [ -e "$file_exist" ]; then let file_exist=file_exist+1 else check_exist=no echo "folder=$(cat /usr/share/bigbashview/bcc/apps/bigremaster/temp/folder.txt) name=BigRemaster 1.0" > $file_exist id=$file_exist fi done # Add files in new folder xterm -e 'biglinux-iso-generator --create-64-bits biglinux "$(cat /usr/share/bigbashview/bcc/apps/bigremaster/temp/folder.txt)"' else id=$p_folder fi # Check for folder NOT selected if [ "$p_folder" = "" ]; then zenity --attach="$windowID" --error --text=$"É preciso selecionar uma pasta de trabalho." echo '' fi selected_folder="$(grep ^folder "$id" | cut -f2 -d"=")" ################ # End of create new remaster folder ################ ############### # Start Content echo '