All pastes #135091 Raw Edit

Vallis

public shellscript v1 · immutable
#135091 ·published 2006-08-16 18:04 UTC
rendered paste body
#!/bin/bashecho "what directory are we backing up (use * for pwd)?"read sourcewhile ["$tar" != "y"] || [ "$tar" != "n"]do        echo "are we creating a tar (y/n)?"        read tardoneecho "where are we putting the backup?"read destecho $sourceecho $tarecho $destif [$tar="y" || $tar="yes"]then        echo "what are we calling the tar file?"        read tarName        echo "will now tar..."        tar -cvvf $tarName $source        mv $tarName $dest        exit 0else if [$tar!= "yes" || "y"]then        rsync -tr $source/* $dest/        exit 0else        echo "some nasty error has occured"        exit 0fiecho "you should never see this"exit 0