Skip to content

Commit

Permalink
Removed two bashisms on live-snapshot.
Browse files Browse the repository at this point in the history
* Thanks to Luigi Capriotti <l.capriotti@xbmc.org> for pointing this
  out.
  • Loading branch information
mammadori committed Jun 18, 2009
1 parent 371b63f commit 1097516
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/live-snapshot
Expand Up @@ -238,7 +238,7 @@ Defaults ()
# Parse resync string
if [ -n "${SNAP_RESYNC_STRING}" ]
then
SNAP_COW=$(echo "${SNAP_RESYNC_STRING/\/root/${DEF_SNAP_COW}}" | cut -f1 -d ':')
SNAP_COW=$(echo "${SNAP_RESYNC_STRING}" | sed -e 's|^/root\([^:.]*\).*$|'"${DEF_SNAP_COW}"'\1|')
SNAP_DEV=$(echo "${SNAP_RESYNC_STRING}" | cut -f2 -d ':')
SNAP_MNT=$(echo "${SNAP_RESYNC_STRING}" | cut -f3 -d ':')
DEST="${MOUNTP}/${SNAP_MNT}"
Expand Down Expand Up @@ -362,7 +362,7 @@ Do_filelist ()
if [ -f "${SNAP_LIST}" ]
then
# if SNAP_COW == /live/cow/home, SNAP_RW = /home
SNAP_RW="${SNAP_COW/${DEF_SNAP_COW}}"
SNAP_RW=$(echo "${SNAP_COW}" | sed -e "s|${DEF_SNAP_COW}||g")
if [ -z "${SNAP_RW}" ]
then
SNAP_RW="/"
Expand Down

0 comments on commit 1097516

Please sign in to comment.