Package Details: plasma-desktop-git 6.0.80_r11524.gf3a8cd50e-1

Git Clone URL: https://aur.archlinux.org/plasma-desktop-git.git (read-only, click to copy)
Package Base: plasma-desktop-git
Description: KDE Plasma Desktop
Upstream URL: https://kde.org/plasma-desktop/
Licenses: LGPL-2.0-or-later
Groups: plasma-git
Conflicts: knetattach, knetattach-git, plasma-desktop, user-manager, user-manager-git
Provides: knetattach, knetattach-git, plasma-desktop, user-manager, user-manager-git
Replaces: knetattach-git, user-manager-git
Submitter: arojas
Maintainer: IslandC0der (chaotic-aur)
Last Packager: IslandC0der
Votes: 9
Popularity: 0.000000
First Submitted: 2014-03-31 06:31 (UTC)
Last Updated: 2024-03-02 13:37 (UTC)

Dependencies (85)

Required by (40)

Sources (1)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 .. 12 Next › Last »

IslandC0der commented on 2021-08-14 23:26 (UTC)

That's right :D

Neko-san commented on 2021-08-14 21:53 (UTC)

Like this?

    case $dir in

    plasma-desktop)
          cat <<- \EOF >> PKGBUILD
      build() {
        cmake -B build -S $pkgname-$pkgver \
          -DCMAKE_INSTALL_LIBEXECDIR=lib \
          -DBUILD_TESTING=OFF \
          -DCMAKE_CXX_COMPILER=clang++ \
          -DCMAKE_C_COMPILER=clang \
          -DUSE_NATIVE_INSTRUCTIONS=ON \
          -DCMAKE_BUILD_TYPE=Release
        sed -i 's/O2/O3/g' "$srcdir/build/CMakeCache.txt"
        sed -i 's/O1/O3/g' "$srcdir/build/CMakeCache.txt"
        sed -i 's/-march=x86-64/-march=native/g' "$srcdir/build/CMakeCache.txt"
        sed -i 's/-mtune=generic/-mtune=native/g' "$srcdir/build/CMakeCache.txt"
        CXXFLAGS+=" -minline-all-stringops -flto=16 -fuse-linker-plugin -flto-compression-level=19 -stdlib=libc++ -lstdc++"
        CFLAGS+=" -minline-all-stringops -flto=16 -fuse-linker-plugin -flto-compression-level=19"
        cmake --build build -j $(nproc)
      }
EOF
    ;;

    esac

IslandC0der commented on 2021-08-14 17:03 (UTC) (edited on 2021-08-14 17:07 (UTC) by IslandC0der)

Regarding the optimizations: it's usually not recommend to make very long if...elif chains, which would instead be replaced by case switches:

case $dir in
  dir1)
    ## cat command
  ;;

  dir2|dir3) ## notice you can group a bunch of dirs which have the same cat commands
    ## different cat commands
  ;;

  dir4|dir5|dir6|dir7|dir8) ## as many as your heart desires!
    ## more cat commands
  ;;
esac

Even though, for all intents and purposes, your chains work just fine, this is more efficient, saves some space, and looks cleaner :)

I would definitely recommend it if you'll be using that script a lot and even expanding on it, as this format is a bit more organized and easier to read. So even if it's not worth it for this project, maybe it'll come in useful someday :)

IslandC0der commented on 2021-08-14 16:25 (UTC) (edited on 2021-08-14 16:31 (UTC) by IslandC0der)

The for loop will iterate through every directory in ~/asp/ and git fetch the upstream changes; if (and only if) there are any (if HEAD is different from HEAD@{upstream}), it will apply them (git reset), append your changes (with the respective cat command for that $dir), and rebuild.

(EDIT: Therefore, the $dir variable would never contain all the directories, only the one which the for loop is currently iterating through.)

Otherwise, it simply skips that directory (i.e. it doesn't apply any cat commands or rebuild), and moves on to the next one.

Neko-san commented on 2021-08-14 00:57 (UTC) (edited on 2021-08-14 00:58 (UTC) by Neko-san)

@IslandC0der One more question: would the if checks actually not work properly since the ~/asp/ folder contains all the directories in $dir and the script would just constantly "update" the cat commands?

And that would be great! I'd appreciate that too, thanks (and oki :D )

IslandC0der commented on 2021-08-14 00:56 (UTC)

Awesome! I'm really glad I could help, do let me know if anything else breaks :)

Also, if you want to, I could help you make that script a bit more robust and efficient, which is usually a good idea if you'll be using it a lot (not today though, gotta go get some sleep!)

Neko-san commented on 2021-08-14 00:41 (UTC) (edited on 2021-08-14 00:41 (UTC) by Neko-san)

@IslandC0der No errors or warnings now; I really appreciate the help, by the way!

IslandC0der commented on 2021-08-14 00:27 (UTC)

So is everything working now? Any errors/warnings still?

Neko-san commented on 2021-08-13 23:54 (UTC)

@IslandC0der It just says:

fatal: not a git repository (or any of the parent directories): .git

EDIT: Had to do this in ~/.cache/asp/ directory but, yeah, it worked

IslandC0der commented on 2021-08-13 23:36 (UTC)

And does git prune fix it?