How to implement multi-line shell command in declarative syntax?

Hi, how can I implement this multi-line code as a ‘sh’ command in a declarative pipeline please?

if [ ! -d $LOCALREPO_VC_DIR ]
    git clone $REPOSRC $LOCALREPO
    git pull $REPOSRC

sh commands are strings, Just use standard groovy multiline strings (triple quotes) if you use single quotes ‘’’ then $'s will be passed to shell and you will not be able to pass in groovy variables into your script, if you use triple-double quotes “”", your ${} expressions will be resolved by groovy before shell runs, so you will need to escape the $ signs you want to pass to shell