#!/usr/bin/python
#program: backup_v2.py - main module
import os
def newline():
print '\n'
def splash():
splashy = True
while splashy:
print '''
BackupPy - a python backup script
Copyright (c) 2006 Sean Wahl
This Software is Placed under the MIT License
see LICENSE for the full text.
press enter to contine
'''
splash_enter = raw_input('')
if splash_enter ==
## tests each app by running them
def app_test(a, b, c):
global auto_menu
auto_menu = ' '
if os.system(a) == 0:
auto_menu = auto_menu + a
elif os.system(a) == 1:
auto_menu = auto_menu + x
else:
auto_menu = auto_menu + x
if os.system(b) == 0:
auto_menu = auto_menu + a
elif os.system(b) == 1:
auto_menu = auto_menu + x
else:
auto_menu = auto_menu + x
if os.system(c) == 0:
auto_menu = auto_menu + a
elif os.system(c) == 1:
auto_menu = auto_menu + x
else:
auto_menu = auto_menu + x
## touch the compression test, test data
os.system('touch /tmp/test.me')
## setup the varibles that handle the programs
prog_zip = 'zip'
prog_bzip = 'bzip2'
prog_tar = 'tar'
#prog_lzma =
## set up the command lines for the test
prog_a = prog_bzip + ' -9fkvv /tmp/test.me &> /dev/null'
prog_b = prog_zip + ' -h &> /dev/null'
prog_c = prog_tar + ' --help &> /dev/null'
#prog_d = prog_lzma + ''
## Pass the above varibles to the test loop
app_test(prog_a, prog_b, prog_c)
##remove the test file
os.system('rm /tmp/test.me*')
# Display Splash
splash()
#display menu