scripts/copy-files

52 lines
1001 B
Plaintext
Raw Normal View History

#!/usr/bin/env fish
2019-06-07 13:37:33 -07:00
2019-06-29 12:57:32 -07:00
# copy regular files
mkdir -p \
2019-07-12 08:56:12 -07:00
applications \
build-system \
fonts \
network \
scripts \
system \
themes \
unused \
2019-07-22 03:53:26 -07:00
vim \
virtual-machines
2019-06-07 13:37:33 -07:00
while read f t
2019-07-12 08:56:12 -07:00
eval set t $t
cp -r "$t" "$f"
end < files
2019-06-07 13:37:33 -07:00
2019-06-29 13:17:39 -07:00
# copy font configs
function copy-confd -a path out
find $path/*.conf > $out/conflist
2019-06-29 13:17:39 -07:00
for f in $path/*.conf
if not test -L "$f"
cp "$f" "$out"
end
2019-07-12 08:56:12 -07:00
end
2019-06-29 13:17:39 -07:00
end
copy-confd /etc/fonts/conf.d system/fonts/
copy-confd /etc/X11/xorg.conf.d system/xorg/
2019-06-29 12:57:32 -07:00
# copy vim package names
tree -dL 3 ~/.vim/pack > vim/packages
for repo in ~/.vim/pack/*/*/*
2019-07-12 08:56:12 -07:00
pushd $repo
echo -n (basename $PWD)" "
if test -d .git
echo "<"(git config --get remote.(git rev-parse --abbrev-ref "master@{upstream}" | sed 's/\(.*\)\/.*/\1/').url)">"
else
echo "<no url>"
end
2019-07-12 08:56:12 -07:00
popd
2019-07-04 21:25:28 -07:00
end | sort > vim/package_repos
2019-06-29 12:57:32 -07:00
2019-07-22 03:53:26 -07:00
# erase passwords
2019-06-07 13:37:33 -07:00
sed -i 's/password>.*<\//password>password removed<\//g' network/icecast.xml
sed -i 's/password\(\s*\)".*"/password\1"password removed"/g' network/mpd.conf