mirror of
https://gitlab.com/amrron/setup-scripts.git
synced 2026-10-17 01:54:00 -04:00
Added directory checking to make icons function in case it is ran by itself
This commit is contained in:
@@ -1400,6 +1400,35 @@ fi
|
||||
|
||||
function create_icons() {
|
||||
|
||||
function assign_directories() {
|
||||
|
||||
UNSETDIRS=$(yad --image=/tmp/banner.png --center --form --separator="|" \
|
||||
--title "Set Installed Directories" \
|
||||
--field="Tip:TXT" "One or more of the Directory Variables have not been set. Likely due to running install icons by itself.
|
||||
|
||||
Please inform the installer of the following Directories so it can make the requested desktop icons.
|
||||
|
||||
The default locations are prefilled.
|
||||
|
||||
If you did not install any programs for the associated section, you can leave the selection at default." \
|
||||
--field="Radio Directory:MDIR" "$HOME/Radio" \
|
||||
--field="Packet Directory:MDIR" "$HOME/Radio/Packet" \
|
||||
--field="Security Directory:MDIR" "$HOME/Security" \
|
||||
${r} ${c})
|
||||
|
||||
USERDIR=$(echo $UNSETDIRS | awk -F "|" '{print $2}')
|
||||
PACKETDIR=$(echo $UNSETDIRS | awk -F "|" '{print $3}')
|
||||
SECDIR=$(echo $UNSETDIRS | awk -F "|" '{print $4}')
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ( [[ $USERDIR == "" ]] || [[ $SECDIR == "" ]] || [[ $PACKETDIR == "" ]] ); then
|
||||
assign_directories
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if hash fldigi 2>/dev/null; then
|
||||
echo "[Desktop Entry]
|
||||
Name=Fldigi
|
||||
|
||||
Reference in New Issue
Block a user