function backup % BACKUP Makes a backup of the files *.m, *.c, *.mexsg *.mat. % % The backup file will be save in /usr/people/alex/backup. % The backup file will replace the old backupfile. % % To restore the file use: % % uncompress archive_filename.tar.Z % tar -xvfo archive_filename.tar % % Do these operations in the backup directory and copy % the files of interest in the alex directory. % % Claudio 2 Feb, 1995. % % % Copyright (c) 1995 by Claudio Rivetti and Mark Young % claudio@alice.uoregon.edu, mark@alice.uoregon.edu % global AlexDir user=getenv('USER'); fname=[AlexDir 'backup/' 'backup_' user '.tar']; command=['!tar -cvf ' fname ' ' AlexDir '*']; eval(command) command=['!compress -f ' fname]; eval(command) disp(' '); disp(['Backup made in: ' fname '.Z']);