if [ -x /usr/bin/update-desktop-database ]; then
  /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
( cd usr/bin ; rm -rf atom-apm )
( cd usr/bin ; ln -sf ../share/atom/resources/app/apm/node_modules/.bin/apm atom-apm )
( cd usr/share/atom/resources/app/apm/node_modules/mv/node_modules/.bin ; rm -rf rimraf )
( cd usr/share/atom/resources/app/apm/node_modules/mv/node_modules/.bin ; ln -sf ../rimraf/bin.js rimraf )
( cd usr/share/atom/resources/app/apm/node_modules/mv/node_modules/.bin ; rm -rf ncp )
( cd usr/share/atom/resources/app/apm/node_modules/mv/node_modules/.bin ; ln -sf ../ncp/bin/ncp ncp )
( cd usr/share/atom/resources/app/apm/node_modules/.bin ; rm -rf npm )
( cd usr/share/atom/resources/app/apm/node_modules/.bin ; ln -sf ../npm/bin/npm-cli.js npm )
( cd usr/share/atom/resources/app/apm/node_modules/.bin ; rm -rf ncp )
( cd usr/share/atom/resources/app/apm/node_modules/.bin ; ln -sf ../ncp/bin/ncp ncp )
( cd usr/share/atom/resources/app/apm/node_modules/.bin ; rm -rf csonc )
( cd usr/share/atom/resources/app/apm/node_modules/.bin ; ln -sf ../season/bin/csonc csonc )
( cd usr/share/atom/resources/app/apm/node_modules/.bin ; rm -rf apm )
( cd usr/share/atom/resources/app/apm/node_modules/.bin ; ln -sf ../../bin/apm apm )
( cd usr/share/atom/resources/app/apm/node_modules/npm/node_modules/.bin ; rm -rf mkdirp )
( cd usr/share/atom/resources/app/apm/node_modules/npm/node_modules/.bin ; ln -sf ../mkdirp/bin/cmd.js mkdirp )
( cd usr/share/atom/resources/app/apm/node_modules/npm/node_modules/.bin ; rm -rf node-gyp )
( cd usr/share/atom/resources/app/apm/node_modules/npm/node_modules/.bin ; ln -sf ../node-gyp/bin/node-gyp.js node-gyp )
( cd usr/share/atom/resources/app/apm/node_modules/npm/node_modules/.bin ; rm -rf rimraf )
( cd usr/share/atom/resources/app/apm/node_modules/npm/node_modules/.bin ; ln -sf ../rimraf/bin.js rimraf )
( cd usr/share/atom/resources/app/apm/node_modules/npm/node_modules/.bin ; rm -rf opener )
( cd usr/share/atom/resources/app/apm/node_modules/npm/node_modules/.bin ; ln -sf ../opener/opener.js opener )
( cd usr/share/atom/resources/app/apm/node_modules/npm/node_modules/.bin ; rm -rf nopt )
( cd usr/share/atom/resources/app/apm/node_modules/npm/node_modules/.bin ; ln -sf ../nopt/bin/nopt.js nopt )
( cd usr/share/atom/resources/app/apm/node_modules/npm/node_modules/.bin ; rm -rf semver )
( cd usr/share/atom/resources/app/apm/node_modules/npm/node_modules/.bin ; ln -sf ../semver/bin/semver semver )
( cd usr/share/atom/resources/app/apm/node_modules/npm/node_modules/.bin ; rm -rf which )
( cd usr/share/atom/resources/app/apm/node_modules/npm/node_modules/.bin ; ln -sf ../which/bin/which which )
( cd usr/share/atom/resources/app/apm/node_modules/yargs/node_modules/.bin ; rm -rf window-size )
( cd usr/share/atom/resources/app/apm/node_modules/yargs/node_modules/.bin ; ln -sf ../window-size/cli.js window-size )
( cd usr/share/atom/resources/app/apm/node_modules/asar-require/node_modules/asar/node_modules/.bin ; rm -rf mkdirp )
( cd usr/share/atom/resources/app/apm/node_modules/asar-require/node_modules/asar/node_modules/.bin ; ln -sf ../mkdirp/bin/cmd.js mkdirp )
( cd usr/share/atom/resources/app/apm/node_modules/asar-require/node_modules/.bin ; rm -rf asar )
( cd usr/share/atom/resources/app/apm/node_modules/asar-require/node_modules/.bin ; ln -sf ../asar/bin/asar asar )
( cd usr/share/atom/resources/app/apm/node_modules/season/node_modules/cson-parser/node_modules/.bin ; rm -rf cake )
( cd usr/share/atom/resources/app/apm/node_modules/season/node_modules/cson-parser/node_modules/.bin ; ln -sf ../coffee-script/bin/cake cake )
( cd usr/share/atom/resources/app/apm/node_modules/season/node_modules/cson-parser/node_modules/.bin ; rm -rf coffee )
( cd usr/share/atom/resources/app/apm/node_modules/season/node_modules/cson-parser/node_modules/.bin ; ln -sf ../coffee-script/bin/coffee coffee )
( cd usr/share/atom/resources/app/apm/node_modules/temp/node_modules/.bin ; rm -rf rimraf )
( cd usr/share/atom/resources/app/apm/node_modules/temp/node_modules/.bin ; ln -sf ../rimraf/bin.js rimraf )
( cd usr/share/atom/resources/app/apm/node_modules/fs-plus/node_modules/.bin ; rm -rf rimraf )
( cd usr/share/atom/resources/app/apm/node_modules/fs-plus/node_modules/.bin ; ln -sf ../rimraf/bin.js rimraf )
( cd usr/doc/atom-1.3.0/docs ; rm -rf contributing.md )
( cd usr/doc/atom-1.3.0/docs ; ln -sf ../CONTRIBUTING.md contributing.md )
