Upgrading performance-tweaks

So I've hopped onto Garuda for a month or so now, and every time I update there seems to be some kind of issue.

Here's the latest, since nobody has reported it yet it seems.

upgrading performance-tweaks
/tmp/alpm_2iwPyo/.INSTALL: line 11: syntax error near unexpected token `}'
/tmp/alpm_2iwPyo/.INSTALL: line 11: `}'
/usr/bin/bash: line 1: post_upgrade: command not found
error: command failed to execute correctly
2 Likes

Thanks for the report. Expect a fix soon after people are awake.

1 Like

I figured it out. It’s because the post install and post upgrade functions are blank.

performance-tweaks.install (CURRENT)

msg() {
    ALL_OFF="\e[1;0m"
    BOLD="\e[1;1m"
    GREEN="${BOLD}\e[1;32m"
        local mesg=$1; shift
        printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}" "$@" >&2
}

post_install() {

}

post_upgrade() {

}

# vim: ts=2 sw=2 et:

performance-tweaks.install (FIXED)

msg() {
    ALL_OFF="\e[1;0m"
    BOLD="\e[1;1m"
    GREEN="${BOLD}\e[1;32m"
        local mesg=$1; shift
        printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}" "$@" >&2
}

post_install() {
        echo "CAN'T BE BLANK LINE"
}

post_upgrade() {
        echo "CAN'T BE BLANK LINE"
}

# vim: ts=2 sw=2 et:
4 Likes

Ha! I made a git pull request for my changes. The changes suck but I just wanted to see if I could do it, I've never used git before.

4 Likes

The "do nothing" (no-op) command in most shells, Bash included, is : (colon, not to be confused with a semicolon which is how you'd write an empty statement in a language like C).

So if you have empty functions, you should put the "do nothing" commands there:

post_install() {
    :
}

post_upgrade() {
    :
}
6 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.