u
This commit is contained in:
@@ -2,11 +2,12 @@
|
|||||||
|
|
||||||
# klevstul
|
# klevstul
|
||||||
|
|
||||||
echo "<< 99_dots.sh >>"
|
echo "<< 99_download.sh >>"
|
||||||
|
|
||||||
user=poq
|
user=poq
|
||||||
base_url=https://git.mz.fo/fro/lnx-arch/raw/branch/master
|
base_dots_url=https://git.mz.fo/fro/lnx-arch/raw/branch/master
|
||||||
targz_url=https://git.mz.fo/fro/lnx-arch/archive/master.tar.gz
|
targz_dots_url=https://git.mz.fo/fro/lnx-arch/archive/master.tar.gz
|
||||||
|
|
||||||
clone_trg=/tmp
|
clone_trg=/tmp
|
||||||
dots_trg=${clone_trg}/lnx-arch/dots
|
dots_trg=${clone_trg}/lnx-arch/dots
|
||||||
|
|
||||||
@@ -29,13 +30,15 @@ operation=$1
|
|||||||
# helper function
|
# helper function
|
||||||
download_repo() {
|
download_repo() {
|
||||||
|
|
||||||
|
_targz_url=$1
|
||||||
|
|
||||||
# make clone target directory, if it doesn't exist
|
# make clone target directory, if it doesn't exist
|
||||||
mkdir -p ${clone_trg}
|
mkdir -p ${clone_trg}
|
||||||
|
|
||||||
# instead of doing a git clone (like `git clone ${clone_url} ${clone_trg}`),
|
# instead of doing a git clone (like `git clone ${clone_url} ${clone_trg}`),
|
||||||
# where i would have emptied the target dir each time, i download the
|
# where i would have emptied the target dir each time, i download the
|
||||||
# source as a tar.gz.
|
# source as a tar.gz.
|
||||||
wget --show-progress ${targz_url} -O ${clone_trg}/tmp.tar.gz
|
wget --show-progress ${_targz_url} -O ${clone_trg}/tmp.tar.gz
|
||||||
tar -xzf ${clone_trg}/tmp.tar.gz -C ${clone_trg}
|
tar -xzf ${clone_trg}/tmp.tar.gz -C ${clone_trg}
|
||||||
rm ${clone_trg}/tmp.tar.gz
|
rm ${clone_trg}/tmp.tar.gz
|
||||||
|
|
||||||
@@ -43,9 +46,9 @@ download_repo() {
|
|||||||
|
|
||||||
|
|
||||||
# download all dots (dot files) from repo
|
# download all dots (dot files) from repo
|
||||||
if [ ${operation} == "all" ] ; then
|
if [ ${operation} == "dots" ] ; then
|
||||||
echo "***** ${operation} *****"
|
echo "***** ${operation} *****"
|
||||||
download_repo
|
download_repo targz_dots_url
|
||||||
tree ${clone_trg}/lnx-arch
|
tree ${clone_trg}/lnx-arch
|
||||||
|
|
||||||
target_file_name=hyprland.conf
|
target_file_name=hyprland.conf
|
||||||
Reference in New Issue
Block a user