From 5e8b1198c33f7cd016f54fcb6e440b592adec58d Mon Sep 17 00:00:00 2001 From: exu Date: Fri, 8 Dec 2023 20:11:16 +0100 Subject: [PATCH] Integrate changes to enable temporary directories commit 4462f39a8e18bfb5a48b8277bbceb4cf8128c18d Author: exu Date: Fri Dec 8 20:08:49 2023 +0100 Fix paths for bash-cat commit a3e4d5d4bbd3c7bef4026d40905db004fbc9171f Author: exu Date: Fri Dec 8 20:07:29 2023 +0100 Subfolder for bash cat commit eef11cf2ce3eb3c14d9a2d5716551d5082b25b98 Author: exu Date: Fri Dec 8 20:06:02 2023 +0100 Missed some paths commit cf669bf340e58637a4f550245e0866d05f9f69b9 Author: exu Date: Fri Dec 8 20:05:01 2023 +0100 Fix paths commit c084949ab35f8e231bc8341a4501d7ac7c1a57ef Author: exu Date: Fri Dec 8 20:00:19 2023 +0100 Fix git clone commit 0aaa00b93097c2173d40d4dec687f8b6c7f5a9b1 Author: exu Date: Fri Dec 8 19:58:54 2023 +0100 Don't anymore commit 9a7fef2bbb5b62206a3015c1c2dd858ed84aba1c Author: exu Date: Fri Dec 8 19:54:06 2023 +0100 Debugging commit 9071e13f4b5beeed762d3765e8bdeeb558133161 Author: exu Date: Fri Dec 8 19:53:34 2023 +0100 Revert mode change commit 1432f707ea1f34592a71827074e6a39b622b8861 Author: exu Date: Fri Dec 8 19:53:06 2023 +0100 Don't need to rm commit 2ee39a346c7a36095fc8c81de918ab1bef919a00 Author: exu Date: Fri Dec 8 19:51:45 2023 +0100 Correctly launch new config commit 9f0fbac8cfa27973b358aa1c9bc02d887c8d2252 Author: exu Date: Fri Dec 8 19:49:37 2023 +0100 Debug echo commit cf373cd9e2fddbd220271796921734c953e10c56 Author: exu Date: Fri Dec 8 19:47:11 2023 +0100 Remove old configs just in case commit 9fab9d135877d903bbfed0a3bc0f68588e1fbbf8 Author: exu Date: Fri Dec 8 19:15:34 2023 +0100 Don't cd commit 14066cad62127d601400bc91716941e48bd0d772 Author: exu Date: Fri Dec 8 19:14:33 2023 +0100 Use new path for gsettings commit 837d8e41b98051824d438803b15ebb937c75fe1e Author: exu Date: Fri Dec 8 19:10:48 2023 +0100 Remove arco linux config commit bd58b886d20b52a48d240d8c0e27c3cc302454df Author: exu Date: Fri Dec 8 19:10:24 2023 +0100 Modify path to (hopefully) all file/dir sources commit afbce1bffb81012b6e189d1f41a8b5b975674938 Author: exu Date: Fri Dec 8 18:19:36 2023 +0100 Specify branch for download commit 67ec900d851be292d91fdc22f93b0b19927c9028 Author: exu Date: Fri Dec 8 18:19:01 2023 +0100 Start of changing to temporary directories as base --- arch-config/etc/arco-pacman.conf | 117 ----------------------------- arch-config/scripts/arch-config.sh | 95 ++++++++++------------- 2 files changed, 38 insertions(+), 174 deletions(-) delete mode 100755 arch-config/etc/arco-pacman.conf diff --git a/arch-config/etc/arco-pacman.conf b/arch-config/etc/arco-pacman.conf deleted file mode 100755 index c7cf6545..00000000 --- a/arch-config/etc/arco-pacman.conf +++ /dev/null @@ -1,117 +0,0 @@ -# -# /etc/pacman.conf -# -# See the pacman.conf(5) manpage for option and repository directives - -# -# GENERAL OPTIONS -# -[options] -# The following paths are commented out with their default values listed. -# If you wish to use different paths, uncomment and update the paths. -#RootDir = / -#DBPath = /var/lib/pacman/ -#CacheDir = /var/cache/pacman/pkg/ -#LogFile = /var/log/pacman.log -#GPGDir = /etc/pacman.d/gnupg/ -#HookDir = /etc/pacman.d/hooks/ -HoldPkg = pacman glibc -#XferCommand = /usr/bin/curl -C - -f %u > %o -#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u -#CleanMethod = KeepInstalled -Architecture = auto - -# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup -IgnorePkg = grub packettracer -#IgnoreGroup = - -#NoUpgrade = -#NoExtract = - -# Misc options -#UseSyslog -Color -#NoProgressBar -CheckSpace -VerbosePkgLists -ILoveCandy -ParallelDownloads = 5 - -# By default, pacman accepts packages signed by keys that its local keyring -# trusts (see pacman-key and its man page), as well as unsigned packages. -SigLevel = Required DatabaseOptional -LocalFileSigLevel = Optional -#RemoteFileSigLevel = Required - -# NOTE: You must run `pacman-key --init` before first using pacman; the local -# keyring can then be populated with the keys of all official Arch Linux -# packagers with `pacman-key --populate archlinux`. - -# -# REPOSITORIES -# - can be defined here or included from another file -# - pacman will search repositories in the order defined here -# - local/custom mirrors can be added here or in separate files -# - repositories listed first will take precedence when packages -# have identical names, regardless of version number -# - URLs will have $repo replaced by the name of the current repo -# - URLs will have $arch replaced by the name of the architecture -# -# Repository entries are of the format: -# [repo-name] -# Server = ServerName -# Include = IncludePath -# -# The header [repo-name] is crucial - it must be present and -# uncommented to enable the repo. -# - -# The testing repositories are disabled by default. To enable, uncomment the -# repo name header and Include lines. You can add preferred servers immediately -# after the header, and they will be used before the default mirrors. - -#[testing] -#Include = /etc/pacman.d/mirrorlist - -[core] -Include = /etc/pacman.d/mirrorlist - -[extra] -Include = /etc/pacman.d/mirrorlist - -#[community-testing] -#Include = /etc/pacman.d/mirrorlist - -[community] -Include = /etc/pacman.d/mirrorlist - -# If you want to run 32 bit applications on your x86_64 system, -# enable the multilib repositories as required here. - -#[multilib-testing] -#Include = /etc/pacman.d/mirrorlist - -[multilib] -Include = /etc/pacman.d/mirrorlist - -# An example of a custom package repository. See the pacman manpage for -# tips on creating your own repositories. -#[custom] -#SigLevel = Optional TrustAll -#Server = file:///home/custompkgs - -#[arcolinux_repo_testing] -#SigLevel = Required DatabaseOptional -#Include = /etc/pacman.d/arcolinux-mirrorlist - -[arcolinux_repo] -SigLevel = Required DatabaseOptional -Include = /etc/pacman.d/arcolinux-mirrorlist - -[arcolinux_repo_3party] -SigLevel = Required DatabaseOptional -Include = /etc/pacman.d/arcolinux-mirrorlist - -[arcolinux_repo_xlarge] -SigLevel = Required DatabaseOptional -Include = /etc/pacman.d/arcolinux-mirrorlist diff --git a/arch-config/scripts/arch-config.sh b/arch-config/scripts/arch-config.sh index 3ac4a8f9..6bdb0150 100755 --- a/arch-config/scripts/arch-config.sh +++ b/arch-config/scripts/arch-config.sh @@ -52,24 +52,29 @@ EOF # get script directory scriptloc="$BASH_SOURCE" -scriptpath="$(dirname "$scriptloc")" +#scriptpath="$(dirname "$scriptloc")" # change to home -cd "$HOME" +#cd "$HOME" # remove old installs -rm -rf ~/configs +#rm -rf ~/configs + +# Use temporary directory for download +# FIXME probably lots of issues at first +tempdir="$(mktemp -d)" +#cd "$tempdir" echo "Checking config file" #clone this repo -git clone https://gitea.exu.li/realstickman/configs.git &>/dev/null +git clone -b temporary-dir https://gitea.exu.li/realstickman/configs.git "$tempdir" &>/dev/null # check if the install scripts are the same # NOTE Arguments get passed automatically now -if ! cmp --silent "$scriptloc" "$HOME/configs/arch-config/scripts/arch-config.sh"; then +if ! cmp --silent "$scriptloc" "$HOME/scripts/arch-config.sh"; then echo Removed old config file and launched new one. - rm "$scriptloc" && cp "$HOME/configs/arch-config/scripts/arch-config.sh" "$HOME/scripts/" && bash ~/scripts/arch-config.sh "$@" + cp "$tempdir/arch-config/scripts/arch-config.sh" "$HOME/scripts/" && bash ~/scripts/arch-config.sh "$@" fi # if no seltheme file exists, ask to select a theme @@ -218,14 +223,9 @@ cat </dev/null -cp ./bash-cat-with-cat/cat.sh "$HOME/scripts/pieces/cat.sh" -rm -rf ./bash-cat-with-cat +mkdir "$tempdir/bash-cat-with-cat" +git clone https://github.com/RealStickman/bash-cat-with-cat.git "$tempdir/bash-cat-with-cat" &>/dev/null +cp "$tempdir/bash-cat-with-cat/cat.sh" "$HOME/scripts/pieces/cat.sh" +#rm -rf ./bash-cat-with-cat -: ' -echo -cat </dev/null -cp ./PSipcalc/PSipcalc.ps1 "$HOME/scripts/in_path/sc-psipcalc" -rm -rf ./PSipcalc -' echo cat <