exclude custom post type from running a function

Reorder the logic, and fix the minor syntax error in your appended string:

function add_post_content($content) {
    if ( 'portfolio' == get_post_type() )
        return $content;

    if ( is_single() )
        return $content . '<p>Shortlink: ' . wp_get_shortlink() . '</p>';

    return $content;
}