To upgrade SVN, check the version number before and after the upgrade.
svn_start_version = IO.popen("svn info").readlines[4] `svn update` svn_end_version = IO.popen("svn info").readlines[4] if svn_end_version > svn_start_version "success" end
For cp, you can check the file size in the source file equal to the copied file.
source_file_size = IO.popen("du file1").readlines `cp file1 file2` dest_file_size = IO.popen("du file2").readlines if dest_file_size == source_file_size "success" end
Unixmonkey
source share