The meaning of shave it (same structure as 'do it' and '[We've] made it!', with crypto-referential 'it') is 'just about manage to ...' (survive / win the match / pass the exam ...).
I've not yet found the expression in a dictionary, but the related 'It was a close shave' is a well-known metaphor. 'X just about shaved it' is used informally in the UK at least to mean '[Side] X were just about the better side [and thus deserved to / their win]':
"The score was irrelevant. Both sides wanted to win the match and
Oldham probably just about shaved it...." [The Bolton
Another example showing a close victory / achievement / outperformance / overcoming:
He was brilliant; so was she. I've watched the favourite & although
Olivia Coleman was very good, I think Close just about shaved it for
me, great acting. [tidied]
'We can shave it through on the grub' is thus 'We can just about manage [until the situation improves] on the food we've got at the moment.'
Sleeps here is a metonym/synecdoche for days, days travelling. It obviously connotes more of the lifestyle being enjoyed/endured than the unmarked term 'days'.
Merriam-Webster gives the broadened senses:
3a : a period spent sleeping
b : night
c : a day's journey
There is a famous canyon in the Southwest (arguably just about) of the United States called 'Ten Sleep Canyon' [TravelWyoming] (though it took the coach my wife and I were on less than a morning to negotiate).