Commit b1d8f09f authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Symlink duplicate gems to save space

parent 2bfe0ef2
......@@ -113,6 +113,17 @@ all: database-config resque-yml nginx-conf
rm -rf /usr/local/share/.yarnrc
/bin/sh cleanup gitlab dev doc git tests cache ports man patches node_modules windows macos bytecode maps packed_assets
root=/srv ; \
folders=(`find $$root -name gems -type d`) ; \
dupes=`find $$root -name gems -type d -exec ls -1 '{}' ';' | sort | uniq -d` ; \
origin=$${folders[0]} ; \
for gem in $$dupes; do \
for folder in $${folders[@]:1}; do \
rm -rf $$folder/$$gem ; \
ln -sv $$origin/$$gem $$folder/$$gem ; \
done ; \
done
rm -rf gitlab-home
umount /tmp
rm -rf tmp
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment