diff --git a/dropbox.py b/dropbox.py index d786247..1eaaf4d 100755 --- a/dropbox.py +++ b/dropbox.py @@ -858,7 +858,7 @@ options: if len(dirs) == 0 and len(nondirs) == 0: #TODO: why? - exit(1) + sys.exit(1) dirs.sort(key=methodcaller('lower')) nondirs.sort(key=methodcaller('lower')) diff --git a/extract b/extract new file mode 100755 index 0000000..3cba8bc --- /dev/null +++ b/extract @@ -0,0 +1,16 @@ +#!/bin/sh +for archive in "$@"; do + # count files in root dir + rootfiles=$(7z l -slt "${archive}" | grep -c 'Path = [^/]*$') + + # add -o switch, if more than one file in root + # checks for >2, because path of the zip file itself is listed too + if [ $rootfiles -gt 2 ]; then + filename=${archive##*/} + rootname=${filename%.*} + opt="-o${rootname}" + fi + + #unpack + 7z x "${opt}" "${archive}" +done diff --git a/getGPUTemp.py b/getGPUTemp.py index 2a6b8b8..21f52f9 100755 --- a/getGPUTemp.py +++ b/getGPUTemp.py @@ -14,11 +14,13 @@ aticonfig_available = is_exe("/usr/bin/aticonfig") sensors_available = is_exe("/usr/bin/sensors") if sensors_available: - command = "sensors radeon-pci-* | grep temp1" + #command = "sensors radeon-pci-* | grep temp1" + command = "sensors thinkpad-isa-* | grep ATI" if aticonfig_available: command = "aticonfig --odgt" # Run command + return_value = check_output(command, shell=True) # Default return value diff --git a/runDesktop.sh b/runDesktop.sh new file mode 100755 index 0000000..033f9fd --- /dev/null +++ b/runDesktop.sh @@ -0,0 +1,2 @@ +#!/bin/sh +`grep '^Exec' $1 | tail -1 | sed 's/^Exec=//' | sed 's/%.//'` &