Refracta Development, Scripts, etc.
Post a reply
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: fiddlin with repsit

Mon Apr 01, 2013 6:14 pm

Got it. If check_status was run multiple times in the same run of the script, the temp file was getting deleted, but the array that held the list was not getting cleared of previous selections. The end of the check_status function now looks like this. (Next to last line was added)

Code:
  `for i in $(echo ${query_list[@]}) ; do
  if dpkg -l | grep "$i" ; then
  echo "$i is installed" >> status_list.tmp
  else
  echo "$i is NOT installed" >> status_list.tmp
  fi
  done
  cat status_list.tmp | zenity --text-info
  query_list=()
  rm status_list.tmp`

Post a reply
Jump to:

Powered by phpBB © phpBB Group.

phpBB Mobile / SEO by Artodia.